hadoophdfsbigdataapache-zookeepernamenode

hdfs reformat name node failed by error Unable to check if JNs are ready for formatting


I want to start fresh hdfs cluster, I start zookeeper and yarn with command : ./zkServer.sh start && start-yarn.sh after above command I started journalnode on each 5 node with command: hdfs --daemon start journalnode

now, before starting namenodes (2 node) i should format namenode : hdfs namenode -format

but this command cause many INFO like:

INFO ipc.Client: Retrying connect to server: bgdata-c11/192.168.30.171:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

and finally this error:

ERROR namenode.NameNode: Failed to start namenode.
org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 2 exceptions thrown:
192.168.30.173:8485: Call From bgdata-c11/192.168.30.171 to bgdata-c13:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
192.168.30.171:8485: Call From bgdata-c11/192.168.30.171 to bgdata-c11:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

can any one help me please!

what i want is to format namenode while journalnodes are active for the first time


Solution

  • I found out the problem, It is coming from zookeeper, there is a file that I created for zookeeper to store it's data (node's ID)... I don't understand why it's causing a problem but when I tried to recreate it, the problem disappeared

    it works but I do not understand the reason. Can any one explain in more detail please?