Skip to content

Hadoop HDFS HA show two StandBy NameNode

原因:可能是zkfc服务没有启动,正确的流程如下

1、在nn001上格式化zkfc

sudo -u hdfs hdfs zkfc -formatZK

2、在三个(或以上)节点上启动journalnode

service hadoop-hdfs-journalnode start

3、在nn001上格式化namenode,并启动nn

sudo -u hdfs hdfs namenode -format
service hadoop-hdfs-namenode start

4、在nn002上格式化备用namenode

sudo -u hdfs hdfs namenode -bootstrapStandby
service hadoop-hdfs-namenode start

5、在nn001和nn002上启动zkfc服务

nn001/nn002
service hadoop-hdfs-zkfc start