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.

HDFS service can't be started using CM API

Highlighted

HDFS service can't be started using CM API

Contributor

I was trying to create and config HDFS service and its roles using CM API (python) .  After all configuration, evertyhing looks fine, but I am not able to formate namenode or start HDFS nodes. I am wondering if there is anything missing before formatting hdfs namenode or start namenode service? do you have any examples? The log seems not be very helpful :(

 

Do I have to create all log directory manually before running the API? Thanks a lot!

 

 

cmd = hdfs.format_hdfs('NAMENODE-0')[0]
if not cmd.wait(CMD_TIMEOUT).success:
  raise Exception("Failed to format HDFS")

 

 

cmds = hdfs.start_roles('NAMENODE-0')
for cmd in cmds:
  print cmd

 

Log:

 

2014-08-28 23:39:20,952  INFO [CommandPusher:service.AbstractBringUpBringDownCommands@644] Aborting BringUp command (50) on service DbService{id=1, name=hdfs-lc} role DbRole{id=12, name=NAMENODE-0, hostName=XXX}.

 

 

 

+-------------------+---------------+---------------------+---------+---------------+------------+
| ROLE TYPE         | HOST          | ROLE NAME           |  STATE  |     HEALTH    |   CONFIG   |
+-------------------+---------------+---------------------+---------+---------------+------------+
| DATANODE          | 20.11.192.264 | DATANODE-1          | STOPPED | NOT_AVAILABLE | UP TO DATE |
| DATANODE          | 20.11.192.265 | DATANODE-0          | STOPPED | NOT_AVAILABLE | UP TO DATE |
| DATANODE          | 20.11.192.263 | DATANODE-2          | STOPPED | NOT_AVAILABLE | UP TO DATE |
| NAMENODE          | 20.11.192.265 | NAMENODE-0          | STOPPED | NOT_AVAILABLE | UP TO DATE |
| SECONDARYNAMENODE | 20.11.192.264 | SECONDARYNAMENODE-0 | STOPPED | NOT_AVAILABLE | UP TO DATE |
+-------------------+---------------+---------------------+---------+---------------+------------+

2 REPLIES 2
Highlighted

Re: HDFS service can't be started using CM API

Are you starting the namenode before attempting to format? What do the logs under /var/log/hadoop-hdfs (on the namenode host) say?

Regards,
Gautam Gopalakrishnan
Highlighted

Re: HDFS service can't be started using CM API

Contributor

I setup this hdfs service following this page:

http://blog.cloudera.com/blog/2012/09/automating-your-cluster-with-cloudera-manager-api/

 

It turned out that there is no log on /var/log/hadoop-hdfs created. any config. missing from this example?

Don't have an account?
Coming from Hortonworks? Activate your account here