Hadoop does not start after restarting or multiple formatting Datanode problem resolution

Source: Internet
Author: User

I. Installed Hadoop, unable to restart after restarting or multiple formatting Datanode

The following error message appears by viewing the log:

2013-07-09 21:02:28,129 INFO org.apache.hadoop.hdfs.server.datanode.DataNode:PacketResponder 0 for block Blk_ 4652602677290140246_1188 terminating
2013-07-09 21:05:52,576 INFO Org.apache.hadoop.hdfs.server.datanode.DataBlockScanner:Verification succeeded for Blk_ 4652602677290140246_1188
2013-07-09 21:12:37,713 WARN Org.apache.hadoop.hdfs.server.datanode.DataNode:java.io.IOException:Call to long1657-06/192.168.0.6:9000 failed on local exception:java.io.EOFException
At Org.apache.hadoop.ipc.Client.wrapException (client.java:775)
At Org.apache.hadoop.ipc.Client.call (client.java:743)
At Org.apache.hadoop.ipc.rpc$invoker.invoke (rpc.java:220)
At Com.sun.proxy. $Proxy 4.sendHeartbeat (Unknown Source)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.offerService (datanode.java:702)
At Org.apache.hadoop.hdfs.server.datanode.DataNode.run (datanode.java:1186)
At Java.lang.Thread.run (thread.java:724)
caused by:java.io.EOFException
At Java.io.DataInputStream.readInt (datainputstream.java:392)
At Org.apache.hadoop.ipc.client$connection.receiveresponse (client.java:501)
At Org.apache.hadoop.ipc.client$connection.run (client.java:446)
Two. Why the problem occurs
When we perform file system formatting, a current/version file is saved in the Namenode Data folder (that is, in the configuration file Dfs.name.dir the path to the local system), the Namespaceid is recorded, the formatted Version of Namenode. If we format the Namenode frequently, then the Datanode is saved (that is, the path Dfs.data.dir the local system in the configuration file) current/ The version file is just the Namespaceid of the namenode that you saved at the first time you formatted it, resulting in a namespaceid inconsistency between Datanode and Namenode.
Iii. Solutions
Change the Namespaceid in the configuration file to current/version in the path of the local system to the same as Namenode. Dfs.data.dir.

If not, you can dfs.data.dir the specified directory in Namenode,datanode to recreate, and then format it in Namenode: Hadoop namenode-format

Start Hadoop to start the Datanode node.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.