Hadoop fails to start Datanode under Linux

Source: Internet
Author: User

Recently re-picked up the Hadoop, so the blog reopened ~

Let me start by describing my problem: this time I'm using Eclipse to run a Hadoop program on Ubuntu. First, follow the tutorial on running a Hadoop program under Eclipse in the Xiamen University Database Lab and configure Eclipse, then start Hadoop at the command line. In the Eclipse interface, there is the input folder, right-click this file home has a upload files to DFS, through this upload, found that the file size of upload is 0.0.

Workaround:

First of all, it's a careless thing to change .... At the command line start Hadoop did not carefully see whether each node is started, the results later found that the Datanode node is not started;

Let's say that Datanode cannot start a situation that may occur:

Note: The following information can be found in accordance with/usr/local/hadoop/logs/hadoop-hadoop-datanode-king-lenovo.log (King-lenovo is my computer name)

1. Error in log: 2015-06-11 16:11:06,822 WARN org.apache.hadoop.hdfs.server.datanode.DataNode:Invalid Dfs.datanode.data.dir/usr/local/hadoop/dfs/data

This error is usually/usr/local/hadoop/dfs/data this file folder has a lock, that is, insufficient access rights.

The workaround is to modify the folder permissions: CHOMD g-w/usr/local/hadoop/dfs/data

2. Error in log:java.io.IOException:Incompatible clusterids In/usr/local/hadoop/dfs/data:namenode Clusterid = CID-C1BF781C-D589-46D7-A246-7F64A6F24BC1; Datanode Clusterid = cid-b1ee6a5b-aa39-4e9e-b849-ee7c4650989b

This error means that the Clusterid of Namenode is inconsistent with the clusterid of Datanode, which is usually caused by multiple formatting nodes.

The workaround is to change the two IDs to a consistent one. Namenode Clusterid in/usr/local/hadoop/dfs/name/current/verson, Datanode Clusterid in /usr/local/hadoop/ Dfs/data/current/verson, change one of them to be the same as the other.

Then restart Hadoop.

Hadoop fails to start Datanode under Linux

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.