执行hdfs namenode -bootstrapStandby的时候报错如下
19/03/24 18:00:48 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:427)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1459)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1559)
原因是${HADOOP_HOME}/etc/hadoop/hdfs-site.xml中配置文件出错了
将主机名namenode2,写成了namdenode2