2021-08-26 00:43:41,743 WARN  [main] namenode.NameNode (NameNode.java:format(1204)) - 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.18.121:8485: Call From c701/192.168.18.121 to c701:8485 failed on connection exception: java.net.ConnectException: 拒绝连接; 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:287)
	at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:282)
	at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:1142)
	at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:209)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1198)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1645)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1755)
2021-08-26 00:43:41,846 ERROR [main] namenode.NameNode (NameNode.java:main(1760)) - Failed to start namenode.
org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 1 exceptions thrown:
192.168.18.121:8485: Call From c701/192.168.18.121 to c701:8485 failed on connection exception: java.net.ConnectException: 拒绝连接; 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:287)
	at org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager.hasSomeData(QuorumJournalManager.java:282)
	at org.apache.hadoop.hdfs.server.common.Storage.confirmFormat(Storage.java:1142)
	at org.apache.hadoop.hdfs.server.namenode.FSImage.confirmFormat(FSImage.java:209)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1198)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1645)
	at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1755)

重新删除数据,并清理其日志文件目录和datanode的数据目录情况下,启动Zookeeper和journalnode
启动三台机器的zookeeper 和 journalnode

hadoop-daemon.sh start journalnode

选择其中一台 重新格式化

hdfs namenode -format
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐