NameNode格式化失败问题的解决

NameNode格式化失败,查看日志,报如下错:

15/04/08 10:05:43 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
15/04/08 10:05:43 INFO namenode.NameNode: createNameNode [-format]
15/04/08 10:05:43 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Formatting using clusterid: CID-6c167702-ea87-43f6-b1ff-8541a35e2a74
15/04/08 10:05:44 INFO namenode.FSNamesystem: fsLock is fair:true
15/04/08 10:05:44 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
15/04/08 10:05:44 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
15/04/08 10:05:44 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
15/04/08 10:05:44 INFO blockmanagement.BlockManager: The block deletion will start around 2015 Apr 08 10:05:44
15/04/08 10:05:44 INFO util.GSet: Computing capacity for map BlocksMap
15/04/08 10:05:44 INFO util.GSet: VM type       = 64-bit
15/04/08 10:05:44 INFO util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
15/04/08 10:05:44 INFO util.GSet: capacity      = 2^21 = 2097152 entries
15/04/08 10:05:44 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
15/04/08 10:05:44 INFO blockmanagement.BlockManager: defaultReplication         = 3
15/04/08 10:05:44 INFO blockmanagement.BlockManager: maxReplication             = 512
15/04/08 10:05:44 INFO blockmanagement.BlockManager: minReplication             = 1
15/04/08 10:05:44 INFO blockmanagement.BlockManager: maxReplicationStreams      = 2
15/04/08 10:05:44 INFO blockmanagement.BlockManager: shouldCheckForEnoughRacks  = false
15/04/08 10:05:44 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
15/04/08 10:05:44 INFO blockmanagement.BlockManager: encryptDataTransfer        = false
15/04/08 10:05:44 INFO blockmanagement.BlockManager: maxNumBlocksToLog          = 1000
15/04/08 10:05:44 INFO namenode.FSNamesystem: fsOwner             = root (auth:SIMPLE)
15/04/08 10:05:44 INFO namenode.FSNamesystem: supergroup          = supergroup
15/04/08 10:05:44 INFO namenode.FSNamesystem: isPermissionEnabled = true
15/04/08 10:05:44 INFO namenode.FSNamesystem: Determined nameservice ID: ns1
15/04/08 10:05:44 INFO namenode.FSNamesystem: HA Enabled: true
15/04/08 10:05:44 INFO namenode.FSNamesystem: Append Enabled: true
15/04/08 10:05:44 INFO util.GSet: Computing capacity for map INodeMap
15/04/08 10:05:44 INFO util.GSet: VM type       = 64-bit
15/04/08 10:05:44 INFO util.GSet: 1.0% max memory 966.7 MB = 9.7 MB
15/04/08 10:05:44 INFO util.GSet: capacity      = 2^20 = 1048576 entries
15/04/08 10:05:44 INFO namenode.NameNode: Caching file names occuring more than 10 times
15/04/08 10:05:44 INFO util.GSet: Computing capacity for map cachedBlocks
15/04/08 10:05:44 INFO util.GSet: VM type       = 64-bit
15/04/08 10:05:44 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
15/04/08 10:05:44 INFO util.GSet: capacity      = 2^18 = 262144 entries
15/04/08 10:05:44 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
15/04/08 10:05:44 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
15/04/08 10:05:44 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension     = 30000
15/04/08 10:05:44 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
15/04/08 10:05:44 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
15/04/08 10:05:44 INFO util.GSet: Computing capacity for map NameNodeRetryCache
15/04/08 10:05:44 INFO util.GSet: VM type       = 64-bit
15/04/08 10:05:44 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
15/04/08 10:05:44 INFO util.GSet: capacity      = 2^15 = 32768 entries
15/04/08 10:05:44 INFO namenode.NNConf: ACLs enabled? false
15/04/08 10:05:44 INFO namenode.NNConf: XAttrs enabled? true
15/04/08 10:05:44 INFO namenode.NNConf: Maximum size of an xattr: 16384
15/04/08 10:05:45 WARN ssl.FileBasedKeyStoresFactory: The property 'ssl.client.truststore.location' has not been set, no TrustStore will be loaded
15/04/08 10:05:46 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:46 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:46 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:47 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:47 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:47 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:48 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:48 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:48 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:49 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:49 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:49 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:50 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:50 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:50 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:51 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:51 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:51 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:52 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:52 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:52 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:53 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:53 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:53 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:54 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:54 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:54 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:55 INFO ipc.Client: Retrying connect to server: worker05/192.168.217.15:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:55 INFO ipc.Client: Retrying connect to server: worker07/192.168.217.17:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:55 INFO ipc.Client: Retrying connect to server: worker06/192.168.217.16:8485. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)
15/04/08 10:05:56 WARN namenode.NameNode: Encountered exception during format: 
org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 2 exceptions thrown:
192.168.217.17:8485: Call From worker01/192.168.217.11 to worker07:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
192.168.217.16:8485: Call From worker01/192.168.217.11 to worker06: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:875)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:171)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:922)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1354)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1473)
15/04/08 10:05:56 FATAL namenode.NameNode: Exception in namenode join
org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 2 exceptions thrown:
192.168.217.17:8485: Call From worker01/192.168.217.11 to worker07:8485 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
192.168.217.16:8485: Call From worker01/192.168.217.11 to worker06: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:875)
        at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:171)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:922)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1354)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1473)
15/04/08 10:05:56 INFO util.ExitUtil: Exiting with status 1
15/04/08 10:05:56 INFO namenode.NameNode: SHUTDOWN_MSG: 


解决方法:先用./zkServer.sh start 启动各个zookeeper,再用./ hadoop-daemon.sh start journalnode启动各个NodeName上的 JournalNode进程。然后再进行格式化即可。

  • 9
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值