由于 AM Container 导致应用程序失败 2 次:以 exitCode 退出:1 [英] Application failed 2 times due to AM Container: exited with exitCode: 1

查看:45
本文介绍了由于 AM Container 导致应用程序失败 2 次:以 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?

任何帮助表示赞赏.

推荐答案

查看资源管理器日志:

namenodeip:8088

您收到此错误:

现在打开终端并检查实际问题:

Now open terminal and check actual problem:

yarn logs -applicationId <APP_ID>

示例:APP_ID = application_1535002188113_0001

Example: APP_ID = application_1535002188113_0001

在我的情况下,它显示权限问题:

In mine case it show permission issues:

所以我给了它:

   sudo -u hdfs hadoop fs -chmod 775 /user/history
   
   or
   
   sudo -u hdfs hadoop fs -chmod 777 /user/history

这篇关于由于 AM Container 导致应用程序失败 2 次:以 exitCode 退出:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆