由于AM容器,应用程序失败了2次:用exitCode:1退出 [英] Application failed 2 times due to AM Container: exited with exitCode: 1
问题描述
我在hadoop-2.7.0上运行了mapreduce作业,但是mapreduce作业无法启动,并且遇到了以下波纹错误:
I ran a mapreduce job on hadoop-2.7.0 but mapreduce job can't be started and I faced with this bellow error:
Job job_1491779488590_0002 failed with state FAILED due to: Application application_1491779488590_0002 failed 2 times due to AM Container for appattempt_1491779488590_0002_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://erfan:8088/cluster/app/application_1491779488590_0002Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1491779488590_0002_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:545)
at org.apache.hadoop.util.Shell.run(Shell.java:456)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.
17/04/10 13:40:08 INFO mapreduce.Job: Counters: 0
此错误的原因是什么,如何解决此问题?
What is the reason of this error and how can I solve this problem?
任何帮助表示赞赏.
推荐答案
您可以查看实际问题的应用程序日志.
You can see the application logs for the actual issue.
为此,您可以在
namenode_ip:50070
在这里您可以看到浏览选项,单击它.
在子菜单中,选择日志.
现在选择用户日志.
For this you can open the namenode web interface on
namenode_ip:50070
Here you can see browse option, click it.
In the submenu, select logs.
Now select the userlogs.
在这里您可以看到您运行的应用程序列表.
Here you can see the list of applications you ran.
在其中打开上述工作的链接application_1491779488590_0002
,您可以查看每张地图的日志&减少任务.
打开地图/减少作业日志链接.
Open the link application_1491779488590_0002
for your above mentioned job inside you can see the logs for each map & reduce task.
Open map/reduce job log link.
在其中可以看到:sys,错误,stdout文件. 从这些日志文件中,您可以获取实际的错误并可以对其进行修复.
Inside it you can see: sys, error, stdout files. From these log files you can get the actual error and can fix it.
或者您看到这些日志
$HADOOP_HOME/logs/userlogs/application_id
路径.
Or you see these logs in
$HADOOP_HOME/logs/userlogs/application_id
path.
应用失败2次,因为如果应用主失败 由于某种原因,默认情况下它将尝试执行该应用程序之一 更多时间.可以将AM retry属性设置为1来避免这种情况.
Application failed 2 times because if application master failed for some reason, by default it will try to execute the application one more time. The AM retry property can be set to 1 to avoid this.
这篇关于由于AM容器,应用程序失败了2次:用exitCode:1退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!