mhmxs
mhmxs

Reputation: 267

Yarn MapReduce job dies with strange message

I have Hadoop-Yarn cluster, when i try to run hadoop examples i get strange error message in the container log:

Error: Could not find or load main class 1638

My Java version is:

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Running services on master:

593 NodeManager
373 SecondaryNameNode
745 JobHistoryServer
507 ResourceManager
129 NameNode
240 DataNode

Running services on slave:

51 DataNode
136 NodeManager
351 Jps

I execute following command:

bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar grep input/hadoop output 'dfs[a-z.]+'

And get this exception:

15/05/13 13:35:31 INFO mapreduce.Job: Running job: job_1431538391289_0005
15/05/13 13:35:37 INFO mapreduce.Job: Job job_1431538391289_0005 running in uber mode : false
15/05/13 13:35:37 INFO mapreduce.Job: map 0% reduce 0%
15/05/13 13:35:37 INFO mapreduce.Job: Job job_1431538391289_0005 failed with state FAILED due to: Application application_1431538391289_0005 failed 2 times due to AM Container for appattempt_1431538391289_0005_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://namenode:8088/proxy/application_1431538391289_0005/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1431538391289_0005_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1: 
at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
at org.apache.hadoop.util.Shell.run(Shell.java:455)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
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:744)

Could you please help me to solve this problem.

Upvotes: 4

Views: 10515

Answers (2)

vv2014
vv2014

Reputation: 11

Check the RAM size configured, increase it as necessary. Had the same issue with my VM only to find it had too little RAM configured (1G).

Upvotes: 0

mhmxs
mhmxs

Reputation: 267

Instead of

<property>
    <name>yarn.app.mapreduce.am.command-opts</name>
    <value>819</value>
</property>

It requires

<property>
    <name>yarn.app.mapreduce.am.command-opts</name>
    <value>-Xmx819m</value>
</property>

Upvotes: 4

Related Questions