Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

NameNode HA - Active / Standby Switch - Force them into roles?

avatar
Rising Star

Good day Hortonworks community!

Recently we've went from an extremely old version of Ambari/HDP to the bleeding edge latest edition.

Along the way I just about converted every service that could be made HA into HA.

Now here is an issue I get sometimes regarding to NN and SNN.

Sometimes NN/SNN will both become "Active" or "Standby" namenodes if one or the other crash.

Question: Is there some kind of setting to force them back into static roles when both NameNodes are online instead of having to manually restart the service of another?

1 ACCEPTED SOLUTION

avatar
Super Guru
@Eric Periard

We don't need to restart any service, you can use below command to force failover.

hdfs haadmin -failover

http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin

View solution in original post

4 REPLIES 4

avatar
Super Guru
@Eric Periard

We don't need to restart any service, you can use below command to force failover.

hdfs haadmin -failover

http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HDFSCommands.html#haadmin

avatar
Super Guru
@Eric Periard

Technically two NN can't be at same status if its happening then either you have configuration issues or hitting some bug.

avatar
Rising Star

Most likely the latter.... I haven't been able to figure out what exactly is causing the issue.

avatar
Rising Star

Very interesting, but it would be nice to have something set them back to Active / Standby automatically once both are online or both have the same status... I have case where both become standby nodes and it breaks access to the hdfs file system.