Common hadoop exceptions and Handling Methods

Source: Internet
Author: User

Exception 1:

Java. Lang. Exception: Java. Lang. outofmemoryerror: Java heap Space

At org. Apache. hadoop. mapred. localjobrunner $ job. Run (Localjobrunner. Java: 400)

Caused by: Java. Lang. outofmemoryerror: javaheap Space

Solution: To solve this problem, you need to adjust the hadoop runtime memory. If the client uses myeclipse, check if eclipse is fully running.


Exception 2:

Error org. Apache. hadoop. HDFS. server. datanode. datanode: incompatible namespaceids... datanode namespaceid... the problem is that namespaceid on namenode is inconsistent with namespaceid on datanode. Cause: each time namenodeformat creates a new namenodeid, and TMP/dfs/data contains the ID in the last format. namenode format clears the data in namenode, however, the data under datanode is not cleared, so the namespaceid on the namenode node is inconsistent with the namespaceid on the datanode node. Startup failed.

Solution: refer to the Web site http://blog.csdn.net/wh62592855/archive/2010/07/21/5752199.aspx to give two solutions, we use the first solution:

(1) Stop the cluster service

(2) Delete the data directory on the problematic datanode node, which is the DFS configured in the hdfs-site.xml file. data. dir Directory, which on this machine is/var/lib/hadoop-0.20/Cache/HDFS/dfs/data/(note: at that time, we performed this step on all datanode and namenode nodes. In case it fails to be deleted, you can save a copy of the data directory first ).

(3) format namenode.

(4) restart the cluster.

Solve the problem. One side effect of this method is that all data on HDFS is lost. If you do not recommend this method when storing important data on HDFS, you can try the second method in the provided URL.

Exception 3:

Exception in thread "Main"Org. Apache. hadoop. Security. accesscontrolexception:
Org. Apache. hadoop. Security. accesscontrolexception: Permission denied: User = hadoop/172.25.18.183, access = execute, inode = "hadoop": hadoop: supergroup: RW-r --

The problem is that you do not have the access permission.

Supplemented and revised later


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.