I had a similar problem under different circumstances. I added the hostname and ip in /etc/hosts file

 


From: Alan Miller [mailto:Alan.Miller@synopsys.com]
Sent: Wednesday, August 08, 2012 12:32 PM
To: user@hadoop.apache.org
Subject: datanode startup before hostname is resovable

 

For development I run CDH4 on my local machine  but I notice that I have to

manually start the datanode (sudo service hadoop-hdfs-datanode start)

after each reboot.

 

Looks like the datanode process is getting started before my DHCP address Is resolvable.

From:  /var/log/hadoop-hdfs/hadoop-hdfs-datanode-myhost.log

 

    2012-08-08 08:44:01,171 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:

    ….

    STARTUP_MSG: Starting DataNode

    STARTUP_MSG:   host = java.net.UnknownHostException: myhostname: myhostname

    ….

    2012-08-08 08:44:02,253 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain java.net.UnknownHostException: myhostname: myhostname

    SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: myhostname: myhostname

 

 

I’m on Fedora 16/x86_64.

 

Regards,

Alan