简体   繁体   中英

Ubuntu: datanode won't start

I have installed hadoop on ubuntu 14. I have install all following that how-to:

http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-multi-node-cluster/#java-io-ioexception-incompatible-namespaceids

but is not my first hadoop install.

The problem is that: datanode don't start. This is the log of datanode.log:

2014-06-22 18:51:34,438 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2014-06-22 18:51:35,640 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2014-06-22 18:51:35,719 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already exists!
2014-06-22 18:51:37,078 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.net.UnknownHostException: ubuntu: ubuntu
        at java.net.InetAddress.getLocalHost(InetAddress.java:1402)
        at org.apache.hadoop.security.SecurityUtil.getLocalHostName(SecurityUtil.java:252)
        at org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:270)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:291)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1582)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1521)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1539)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1665)
        at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1682)

2014-06-22 18:51:37,102 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: ubuntu: ubuntu
************************************************************/

I have tried to format the namenode but without result.

Sometime in the console i read this message:

sudo: unable to resolve host ubuntu

What is this message?

What is the problem ? and how i can solve it?

Update /etc/hosts

127.0.0.1    ubuntu

And /etc/hostname

ubuntu

Restart your pc after this.

When I run the hadoop-1.1.2 on Ubuntu, sometimes the datanode was not start. I know it by using jps command from terminal. When I faced like that I delete the data folder in my hadoop cluster. For me,

>rm -rf /var/opt/hadoop/cluster/dfs/data  
>/home/hadoop/hadoop-1.1.2/bin/hadoop namenode -format

after that, I called JPS again from terminal.At that time, datanode work properly. I don't know this is help to you or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM