Application error 2 times due to AM Container: terminated with exitCode: 1

I completed the mapreduce task on hadoop-2.7.0, but the mapreduce task could not be started, and I encountered this error below:

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 cause of this error and how can I solve this problem?

any help appreciated.

+5
source share
1 answer

You can view application logs for the current issue.

To do this, you can open the namenode web interface at namenode_ip: 50070
Here you can see the viewing option, click on it.
In the submenu, select the logs.
Now select your custom log.

Here you can see the list of applications that you launched.

Open the application_1491779488590_0002 link for your above task inside, you can see the logs for each map and reduce the task. Open the map / unlink the work log.

Inside it you can see: sys, error, stdout files. From these log files, you can get the actual error and fix it.

Or you see these logs in $ HADOOP_HOME / logs / userlogs / application_id.

Application error 2 times, because if for some reason the application wizard failed, by default it will try to run the application again. The AM retry property can be set to 1 to avoid this.

+1
source

Source: https://habr.com/ru/post/1266761/


All Articles