Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

haadmin command args: "Unable to determine service address for namenode"

haadmin command args: "Unable to determine service address for namenode"

Explorer

What do I use for arguments to the "haadmin" command? We have two nameservers, nn8 and nn9 (nn8 is active, nn9 is standby) and the nameservice is named "nameservice" (output of ls /data/disk3/hdfs/dfs/jn.) None of these commands work:

 


hdfs@nn9:~$ hdfs haadmin -ns nameservice -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nn9 -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nn8 -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns http://nn8 -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nn9 -getServiceState nn8
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nn8:50090 -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns http://nn8:50090 -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nameservice -getServiceState nn9
Illegal argument: Unable to determine service address for namenode 'nn9'
hdfs@nn9:~$ hdfs haadmin -ns nn8 -getServiceState nameservice
Illegal argument: Unable to determine service address for namenode 'nameservice'

What am I supposed to type here?

2 REPLIES 2
Highlighted

Re: haadmin command args: "Unable to determine service address for namenode"

Explorer

For some reason that I do not understand, the names of the namenodes in /etc/hadoop/conf.cloudera.hdfs/hdfs-site.xml are "namenode85" and "namenode75".

 

# hdfs haadmin -getServiceState namenode85
standby
# hdfs haadmin -getServiceState namenode75
active

 

Where do these random names come from?

Re: haadmin command args: "Unable to determine service address for namenode"

Expert Contributor

Hi @wsanders

75 and 85 in your case are the namenodes services id in the database..
Screenshot_8.png