Solve the task process exit with nonzero status of 134 exception thrown by hadoop

Source: Internet
Author: User

First, let me talk about the cause of this problem.

An error occurs in the tasktracker log: 13:49:27, 734 info org. Apache. hadoop. mapred. tasktracker: JVM with ID: jvm_201112211104_0002_m_1605380604 given task: attempt_2011122111__0002_m_000002_0
13:49:28, 245 warn org. Apache. hadoop. mapred. defaulttaskcontroller: Exit code from task is: 134
13:49:28, 245 info org. Apache. hadoop. mapred. defaulttaskcontroller: output from defaulttaskcontroller's launchtask follows:
13:49:28, 245 info org. Apache. hadoop. mapred. taskcontroller:
13:49:28, 364 info org. Apache. hadoop. mapred. jvmmanager: JVM: jvm_2011122111__0002_m_1605380604 exited with exit code 134. Number of tasks it ran: 0
13:49:28, 367 warn org. Apache. hadoop. mapred. taskrunner: attempt_2011122111__0002_m_000002_0: Child Error
Java. Io. ioexception: Job process exit with nonzero status of 134.
At Org. apache. hadoop. mapred. taskrunner. run (taskrunner. java: 258) because the 64-bit cluster is interviewed on the server, the cluster tested by myself is 32-bit. It is no problem to run wordcount on the testing machine, but it does run a job on the server, always stuck in mapred. jobclient: Map 0% reduce 0% has tried many methods and has not been solved. It is quite strange that we are trying to re-compile ant in the following article, but the re-compile process is very slow, hope to solve the problem .. The following article is reposted: ========================================== task process exit with nonzero status of 134 exception (original)

    Blog type: 

  • Cloud computing
Please indicate the source for hadoopjava reprinting. Thank you:
Http://jackiee-cn.iteye.com/blog/1192526

Problem: 
After hadoop is installed, run the hadoop sample program in a standalone environment. Modify the/etc/profile file and add the following content:
Export java_home =/opt/jdk1.6.0 _ 29
Export hadoop_home =/opt/hadoop-0.20.203.0
Export hadoop_classpath = "$ hadoop_home/javademo"
Export classpath =.: $ java_home/JRE/lib: $ java_home/lib/tools. Jar
Export Path = $ java_home/bin: $ hadoop_home/bin: $ path
Run the following command to make the configuration take effect:
$./Etc/profile
Execute the sample program (or execute the wordcount example that comes with hadoop ):
Hadoop demo. maxtemperature input/sample.txt output
The log is always in the following status:
Mapred. jobclient: Map 0% reduce 0%
View the hadoop startup process:
$ PS-Ef | grep hadoop
If a process is found to have ended abnormally, five processes (namenode, datanode, secondary namenode, jobtracker, and tasktracker) should be started when hadoop is started normally. tasktracker has terminated abnormally, view hadoop-root-tasktracker -***. log, and an exception is thrown:
Java. Io. ioexception: * task process exit with nonzero status of 134 .*
At org. Apache. hadoop. mapred. taskrunner. Run (taskrunner. Java: 258)

Solution: 
After searching on the internet, I finally solved the problem and explained the ideas:
1. Check the code near line 258 of the org. Apache. hadoop. mapred. taskrunner class through decompilation:
Static
{
Log. debug ("trying to load the custom-built native-hadoop library ...");
Try {
System. loadlibrary ("hadoop ");
Log.info ("loaded the native-hadoop library ");
Nativecodeloaded = true;
}
Catch (throwable t ){
Log. debug ("failed to load native-hadoop with error:" + t );
Log. debug ("Java. Library. Path =" + system. getproperty ("Java. Library. Path "));
}

If (! Nativecodeloaded)
Log. Warn ("unable to load native-hadoop library for your platform... using builtin-Java classes where applicable ");
}
It seems that an error occurred while loading the local database.

2. The following log files are generated in the $ hadoop_home directory:
Hs_err_pid ***. Log
This exception log was opened and not quite understandable. I learned it from the Internet and found some clues. The content of the file header is as follows:
# A fatal error has been detected by the Java Runtime Environment:
#
# Sigfpe (0x8) at PC = 0x40008026, pid = 31393, tid = 2283477936
#
# JRE version: 6.0 _ 29-b08
# Java VM: Java hotspot (TM) Client VM (20.4-B01 mixed mode linux-x86)
# Problematic frame:
# C [ld-linux.so.2 + 0x8026] Double + 0xb6
#
# If you wowould like to submit a bug report, please visit:
# Http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
It indicates that the exception is indeed caused by loading the local database.

3. I learned about the hadoop local database online and found that there are two ways to solve the local database problem:
One way is to invalidate the local library settings by configuring, you can set whether to use the local library in the configuration file CONF/core-site.xml of hadoop:
<Property>
<Name> hadoop. Native. lib </Name>
<Value> false </value>
</Property>
The problem persists after the test.
The second method is to recompile the local database:
So I downloaded an ant and added the following content to/etc/profile:
Export ant_home =/opt/Apache-ant-1.8.0
Export Path = $ java_home/bin: $ hadoop_home/bin: $ ant_home/bin: $ path
Run the following command to make the configuration take effect:
$./Etc/profile
Run the following command in the $ hadoop_home directory:
$ Ant compile-native
After compilation, find the corresponding file in the $ hadoop_home/build/native directory and move the compiled file to the default directory.
Finally, restart the hadoop service and run the test again. Finally, you can see the log of the task execution completed:
11/10/18 08:01:33 info mapred. jobclient: Map 0% reduce 0%
11/10/18 08:01:55 info mapred. jobclient: Map 50% reduce 0%
11/10/18 08:01:58 info mapred. jobclient: Map 100% reduce 0%
11/10/18 08:02:10 info mapred. jobclient: Map 100% reduce 100%
11/10/18 08:02:15 info mapred. jobclient: job complete: job_201110180800_0001

Finally, do not forget to remove or delete the build directory. Otherwise, some unexpected results may occur.

So far, the tangle problem can be solved.

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.