centos7 hadoop wordcount,退出代码127

ssgvzors  于 2021-07-13  发布在  Hadoop
关注(0)|答案(1)|浏览(575)

当我试图执行wordcount程序时出现了一个问题
术后结果:

2021-03-06 10:46:36,826 INFO mapreduce.Job:  map 0% reduce 0%
2021-03-06 10:46:36,845 INFO mapreduce.Job: Job job_1614998747877_0001 failed with state FAILED due to: Application application_1614998747877_0001 failed 2 times due to AM Container for appattempt_1614998747877_0001_000002 exited with  exitCode: 127
Failing this attempt.Diagnostics: [2021-03-06 10:46:36.605]Exception from container-launch.
Container id: container_1614998747877_0001_02_000001
Exit code: 127

[2021-03-06 10:46:36.645]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory

[2021-03-06 10:46:36.646]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory

For more detailed output, check the application tracking page: http://hadoop103:8088/cluster/app/application_1614998747877_0001 Then click on links to logs of each attempt.
. Failing the application.

接下来是网页中的信息:

Application application_1614998747877_0001 failed 2 times due to AM Container for appattempt_1614998747877_0001_000002 exited with exitCode: 127
Failing this attempt.Diagnostics: [2021-03-06 10:46:36.605]Exception from container-launch.
Container id: container_1614998747877_0001_02_000001
Exit code: 127
[2021-03-06 10:46:36.645]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory
[2021-03-06 10:46:36.646]Container exited with a non-zero exit code 127. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
/bin/bash: /bin/java: No such file or directory
For more detailed output, check the application tracking page: http://hadoop103:8088/cluster/app/application_1614998747877_0001 Then click on links to logs of each attempt.
. Failing the application.

谢谢你的帮助

pbwdgjma

pbwdgjma1#

解决了的
需要向hadoop-env.sh添加java\u home路径
在此处输入图像描述

相关问题