Support Questions

Find answers, ask questions, and share your expertise
Announcements
Now Live: Explore expert insights and technical deep dives on the new Cloudera Community BlogsRead the Announcement

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

what we can do next in order to start one of the standby as active ?

Michael-Bronson

avatar

after 2 min we get that:

42905-capture.png

Michael-Bronson

avatar

and now ( after 15 min we get )

I not start anything second namenode became standby

42906-capture.png

Michael-Bronson

avatar
Master Mentor

@Michael Bronson

Can you validate the entry was created.

[zk: localhost:2181(CONNECTED) 1] ls /hadoop-ha/hdfsha

Check lock

[zk: localhost:2181(CONNECTED) 2]  get /hadoop-ha/hdfsha/ActiveStandbyElectorLock

Check the status

$ hdfs haadmin -getServiceState namenode1 
$  hdfs haadmin -getServiceState namenode2

Try to failover

$ hdfs haadmin -failover

Use the below to force one to Active

$ hdfs haadmin -transitionToActive <serviceId> --forceactive

or

$ hdfs haadmin -transitionToStandby <serviceId>

Hope that helps

avatar
[zk: localhost:2181(CONNECTED) 14] ls /hadoop-ha/hdfsha
[
ActiveBreadCrumb] [zk: localhost:2181(CONNECTED) 15]
Michael-Bronson

avatar
get  /hadoop-ha/hdfsha/ActiveBreadCrumb


hdfshann2master03.sys54.com �>(�>
cZxid = 0xce70000039b
ctime = Mon Dec 04 22:40:18 UTC 2017
mZxid = 0xce700000447
mtime = Mon Dec 04 23:06:32 UTC 2017
pZxid = 0xce70000039b
cversion = 0
dataVersion = 4
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 42
numChildren = 0


<br>
Michael-Bronson

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

avatar

hdfs haadmin -transitionToActive master01 --forceactiv

transitionToActive:

incorrect arguments Usage: haadmin [-transitionToActive [--forceactive] <serviceId>]

Michael-Bronson

avatar
Master Mentor

@Michael Bronson

Election issue !

avatar

@Geoffrey - what you mean ?

Michael-Bronson