hdfs reformat name node failed by error无法检查JNs是否准备好格式化

6ljaweal  于 2023-08-01  发布在  HDFS
关注(0)|答案(2)|浏览(204)

我想启动新鲜的hdfs集群,我启动zookeeper和yarn命令:./zkServer.sh start && start-yarn.sh在上面的命令之后,我用命令在每5个节点上启动journalnode:hdfs --daemon start journalnode
现在,在启动namenodes(2节点)之前,我应该格式化namenode:hdfs namenode -format
但此命令会导致许多信息,如:

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)

字符串
最后是这个错误:

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


有谁能帮我吗?
我想要的是格式化namenode而journalnodes是活动的第一次

ojsjcaue

ojsjcaue1#

hdfs-site.xml文件中,有一个名为:dfs.journalnode.edits.dir
您需要在每个日记节点中删除此文件夹内容
格式化群集时要小心(数据将被删除)

kxe2p93d

kxe2p93d2#

我发现了这个问题,它是来自Zookeeper,有一个文件,我为Zookeeper创建的存储它的数据(节点的ID)...我不明白为什么它会导致问题,但当我尝试重新创建它时,问题消失了
它起作用了,但我不明白原因。有谁能再详细解释一下吗?

相关问题