vakul
vakul

Reputation: 157

hadoop datanode dies after few seconds

I installed hadoop-2.2.0 version on vmware and when it starts, it shows all the processes working, but after some time datanode gets killed. So, I checked the logs and I found this:

2014-01-21 04:36:00,325 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2014-01-21 04:36:21,034 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
java.net.UnknownHostException: ubuntu: ubuntu
at java.net.InetAddress.getLocalHost(InetAddress.java:1402)
at org.apache.hadoop.security.SecurityUtil.getLocalHostName(SecurityUtil.java:227)
at org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:247)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1640)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1665)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1837)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1858)
2014-01-21 04:36:21,107 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2014-01-21 04:36:21,114 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: ubuntu: ubuntu
************************************************************/

Upvotes: 0

Views: 3187

Answers (1)

vefthym
vefthym

Reputation: 7462

I think the problem is in your /etc/hosts file. Make sure it is configured correctly. My /etc/hosts file looks like this:

127.0.0.1       localhost
192.168.0.1     master  mypcname
192.168.0.18    slave1
192.168.0.12    slave2
192.168.0.17    slave3

for master and

127.0.0.1       localhost
192.168.0.1     master
192.168.0.18    slave1  slave1pcname
192.168.0.12    slave2
192.168.0.17    slave3

for slave1.

Upvotes: 1

Related Questions