Support Questions

Find answers, ask questions, and share your expertise

how to force name node to be active

avatar

in our ambari cluster both name node are like standby

42878-capture.png

in order to force one of them to be active we do

 hdfs haadmin -transitionToActive --forceactive master01 

Illegal argument: Unable to determine service address for namenode 'master01'

but we get - Unable to determine service address

what this is indicate ? and how to fix this issue ?

Michael-Bronson
38 REPLIES 38

avatar
[hdfs@master01 hdfs]$ hdfs haadmin -transitionToActive master01 --forceactive 
Illegal argument: Unable to determine service address for namenode 'master01'
Michael-Bronson

avatar

@Geoffrey - what we can do next , ? why output from commands show "determine service address for namenode"

Michael-Bronson

avatar
Master Mentor

Because its down !

avatar
Master Mentor

@Michael Bronson

The commands failed because the namenodes were already dead. The ls /hadoop-ha/hdfsha is now responding correctly

.Election issue means the zookeeper can't put the namenode in Active and standby they all remain in a

Can you restart the name nodes and get their status and quickly run with one command

$ hdfs haadmin -getAllServiceState 

Check the health

hdfs haadmin -checkHealth 

There is a difference in your command and the one I posted ,please use the correct serviceId

$ hdfs haadmin -transitionToActive <serviceId> --forceactive 

and yours

$ hdfs haadmin -transitionToActive master01 --forceactiv transitionToActive:

avatar
Master Mentor

@Michael Bronson

Did you run your command as root instead of hdfs

[root@master01 hdfs]# hdfs haadmin -getServiceState master02 
Illegal argument: Unable to determine service address for namenode 'master02'

To validate master02 can you check the names of the namenodes in hdfs-site.xml

avatar

no I run it as user hdfs

Michael-Bronson

avatar
[hdfs@master03 root]$ hdfs haadmin -checkHealth master03 
Illegal argument: Unable to determine service address for namenode 'master03'
Michael-Bronson

avatar

yes all machines are in the file - grep master /etc/hadoop/conf/hdfs-site.xml

Michael-Bronson

avatar
Master Mentor

@Michael Bronson

Can you instead do a

# grep namenodes  /etc/hadoop/conf/hdfs-site.xml

Then get the values of the parameter dfs.ha.namenodes.xxxx

Please let me know