[Solved] yarn error ExitCodeException exitCode=127

I want to submit a task on yarn and report an error:

18/12/14 17:48:56 INFO mapreduce.Job: Job job_1544766080243_0018 failed with state FAILED due to: Application a18_000002 exited with  exitCode: 127
For more detailed output, check application tracking page:http://dev-hadoop6:8088/cluster/app/application_15447
Diagnostics: Exception from container-launch.
Container id: container_1544766080243_0018_02_000001
Exit code: 127
Stack trace: ExitCodeException exitCode=127:
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:585)
        at org.apache.hadoop.util.Shell.run(Shell.java:482)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:776)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerE
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLa
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLa
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)


Container exited with a non-zero exit code 127
Failing this attempt. Failing the application.
18/12/14 17:48:56 INFO mapreduce.Job: Counters: 0
18/12/14 17:48:56 WARN mapreduce.HdfsMapReduce: Path /mapred-temp/job-user-analysis-statistic/01/top_in is not
java.io.IOException: Set input path failed !
        at com.tracker.offline.common.mapreduce.HdfsMapReduce.setInputPath(HdfsMapReduce.java:165)
        at com.tracker.offline.common.mapreduce.HdfsMapReduce.buildJob(HdfsMapReduce.java:122)
        at com.tracker.offline.common.mapreduce.HdfsMapReduce.waitForCompletion(HdfsMapReduce.java:65)
        at com.tracker.offline.business.job.user.JobAnalysisStatisticMR.main (JobAnalysisStatisticMR.java: 88 )
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run (RunJar.java: 221 )
        at org.apache.hadoop.util.RunJar.main (RunJar.java: 136 )
View error information: yarn logs- applicationId application_1544766080243_0018
18/12/14 17:59:57 INFO client.RMProxy: Connecting to ResourceManager at dev-hadoop6/10.100.3.176:8032


Container: container_1544766080243_0018_01_000001 on dev-hadoop5_43772
========================================================================
LogType:stderr
Log Upload Time: Friday December 14  17 : 48 : 56 + 0800  2018 
LogLength: 50
Log Contents:
/bin/bash: /bin/ java: No such file or directory
End of LogType:stderr

LogType:stdout
Log Upload Time: Friday December 14  17 : 48 : 56 + 0800  2018 
LogLength: 0
Log Contents:
End of LogType:stdout

This is not found in java, modify yarn-env.sh

export JAVA_HOME=/home/jdk8

Restart.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *