概述
ERROR namenode.NameNode: Failed to start namenode.
场景:
搭建hadoop3.1.1的HA分布式环境时,格式化node01节点后,在node02执行以下命令同步数据:
hdfs namenode -bootstrapStandby
报错
2019-02-07 21:18:14,687 INFO namenode.NameNode: createNameNode [-bootstrapStandby]
2019-02-07 21:18:15,484 WARN hdfs.DFSUtilClient: Namenode for mycluster remains unresolved for ID nn2. Check your hdfs-site.xml file to ensure namenodes are configured properly.
2019-02-07 21:18:15,493 ERROR namenode.NameNode: Failed to start namenode.
java.io.IOException: java.lang.IllegalStateException: Could not determine own NN ID in namespace 'mycluster'. Please ensure that this node is one of the machines listed as an NN RPC address, or configure dfs.ha.namenode.id
at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:456)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1615)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1710)
Caused by: java.lang.IllegalStateException: Could not determine own NN ID in namespace 'mycluster'. Please ensure that this node is one of the machines listed as an NN RPC address, or configure dfs.ha.namenode.id
原因:
在hdfs-site.xml文件里发现nn2的配置信息多了“.com”
<property>
<name>dfs.namenode.rpc-address.mycluster.nn2</name>
<value>node02.com:8020</value>
</property>
需要在四个节点修改hdfs-site.xml这个配置文件里面的nn2信息,因其他节点的配置文件都是从node01分发下去的;
然后删除mycluster这个文件的文件,再次在node01格式化文件系统,再在node02同步数据即可。
最后
以上就是酷酷萝莉为你收集整理的【大数据报错】ERROR namenode.NameNode: Failed to start namenode.的全部内容,希望文章能够帮你解决【大数据报错】ERROR namenode.NameNode: Failed to start namenode.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复