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

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try my iOS App