简体   繁体   English

CentOS7 hadoop wordcount 退出代码 127

[英]CentOS7 hadoop wordcount with exit code 127

There was a problem when I tried to execute the wordcount program尝试执行 wordcount 程序时出现问题

Results after operation:术后效果:

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.

Next is the information in the web page:接下来是web页面中的信息:

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.

Thank you for your help谢谢您的帮助

solved解决了

need to add JAVA_HOME path to hadoop-env.sh需要将 JAVA_HOME 路径添加到 hadoop-env.sh

enter image description here在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM