首页 > 代码库 > 20140709 NameNode bug2

20140709 NameNode bug2

我用命令:bin/hdfs  namenode  -format 格式化NameNode时报下面的错:

14/07/09 17:12:49 WARN namenode.NameNode: Encountered exception during format: org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 1 exceptions thrown:192.168.56.200:8485: Call From hadoop0/192.168.56.200 to hadoop0:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused	at org.apache.hadoop.hdfs.qjournal.client.QuorumException.create(QuorumException.java:81)	at org.apache.hadoop.hdfs.qjournal.client.QuorumCall.rethrowException(QuorumCall.java:223)	at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:232)	at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:871)	at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:171)	at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:841)	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1256)	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1370)14/07/09 17:12:49 INFO ipc.Client: Retrying connect to server: hadoop1/192.168.56.201:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)14/07/09 17:12:49 INFO ipc.Client: Retrying connect to server: hadoop2/192.168.56.202:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)14/07/09 17:12:49 FATAL namenode.NameNode: Exception in namenode joinorg.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 1 exceptions thrown:192.168.56.200:8485: Call From hadoop0/192.168.56.200 to hadoop0:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused	at org.apache.hadoop.hdfs.qjournal.client.QuorumException.create(QuorumException.java:81)	at org.apache.hadoop.hdfs.qjournal.client.QuorumCall.rethrowException(QuorumCall.java:223)	at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:232)	at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:871)	at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:171)	at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:841)	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1256)	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1370)14/07/09 17:12:49 INFO util.ExitUtil: Exiting with status 114/07/09 17:12:49 INFO namenode.NameNode: SHUTDOWN_MSG:

   原因:NN和NN数据共享用到了journalnode 

 解决: sbin/hadoop-daemon.sh start journalnode