Skip to content

Hadoop HDFS HA show two StandBy NameNode


The reason may be that the zkfc service is not started. The correct process is as follows

It is important to ensure that the Hadoop NameNode is running before starting the ZKFC, as the ZKFC relies on the NameNode to perform its functions.

1. Format the ZKFC on nn001

sudo -u hdfs hdfs zkfc -formatZK

2. Start journalnode on three (or more) nodes

service hadoop-hdfs-journalnode start

3. Format the NameNode on nn001 and start nn

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

4. Format the standby namenode on nn002

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

5. Start the zkfc service on nn001 and nn002

service hadoop-hdfs-zkfc start

Back to Table of Contents

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