Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

both namenodes are standby! how can I active one of them?

avatar
Explorer

It seems like the election of the (active)namenode did not correctly take place.

(Hortonworks /ambari 2.4.0.1/ High-availability)

12 REPLIES 12

avatar
Super Guru

@Jessika314 ninja

In addition to what @dgoodhand mentioned, also make sure of below points -

1. Hostname is correctly set using $hostname and 'hostname -f' command output.

2. Make sure you have correct entries for IPaddress and hostname in 'cat /etc/hosts'

3. Make sure iptables is disabled on all hosts in cluster - '$iptables -L'

4. Selinux must disabled. $sestatus

avatar
Explorer

Check if you have FC and if they are started and running 
nohup hdfs zkfc

avatar
Master Mentor

@hassenseoud 

Triggering log roll on remote NameNode hdpmaste r2/192.168.1.162:8020 2016-10-24 11:25:52,108 WARN ha.EditLogTailer (EditLogTailer.java:triggerActiveLogRoll(276)) - Unable to trigger a roll of the active NN org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.ipc.StandbyException): Operation category JOURNAL is not supported in state standby

Check the active NN

Spoiler
$ hdfs haadmin -getServiceState <serviceId> : dfs.ha.namenodes.mycluster in hdfs-site.xm
Spoiler
$ hdfs haadmin -getServiceState namenode2
active

Example

Spoiler
$ hdfs haadmin -getServiceState namenode1
standby

Action 2
Shutdown whichever of the above was/is the standby from Ambari ensure its stopped.

Action 3
From Ambari do a rolling restart of the zk forum, wait untill all 3 or x are restarted

Action 4
Execute sequentially  the below cmd's

Spoiler

$ hdfs dfsadmin -safemode enter

$ hdfs dfsadmin -saveNamespace

$ hdfs dfsadmin -safemode leave

Restart the JN and the above NN service when all is green then  you can safely start the standby