CDH 4 HA Related Problems

Problem

I meet ‘Failed to initialize High Availability state in ZooKeeper. This might be because a ZNode for this nameservice is already created. Either remove the ZNode, or to reuse the ZNode skip this step and simply start the NameNodes and Failover Controllers. To retry, use the “Initialize High Availability state in ZooKeeper” command available as a Failover Controller action.‘ When I was trying to enable automatic failover for HDFS in Cloudera Manager after HA being enabled.

Error logs:

Solution

1 Disable HA (hdfs, jobtracker)
2 Remove settings in ZooKeeper:

Problem

Error occurs when enabling HA for HDFS from SecondNameNode server in CM:

Solution

hdfs1 -> instances
stop SecondaryNameNode and delete files

Problem

Solution

Remove all instances of namenode and journalnode and disable HA.
Delete all files in JournalNodes’ local folder, for me /hadoop/dfs/jn.
Delete all files for NameNodes but KEEP previous primary namenode’s.
Add new namenode on node which had primary namenode on.

CDH 4 HA Related Problems by @sskaje: https://sskaje.me/2014/02/cdh-4-ha-related-problems/