You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by muzhu88 <mu...@163.com> on 2012/03/27 08:34:17 UTC

Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Hello,
I setup a one node cluster, and deadons run fine.
 
However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
 
But the job failed, and the info shows:
 
12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
.Failing this attempt.. Failing the application.
12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
 
What's the cause of "AM Container" exit?

Re:Re: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by muzhu88 <mu...@163.com>.
I moved the "export ..." from ~.bashrc to $hadoop_home/etc/hadoop/yarn-env.sh, then it works.
Thank you all!



At 2012-03-28 01:03:40,"Vinod Kumar Vavilapalli" <vi...@hortonworks.com> wrote:
>
>Make sure that you export these variables *before* you run ResourceManager, NodeManager and the client.
>
>Also (as of now) HADOOP_MAPRED_HOME and YARN_HOME should be pointing to the same directory.
>
>HTH,
>+Vinod
>
>
>On Mar 27, 2012, at 9:26 AM, muzhu88 wrote:
>
>> After setting these environment variables, the error still exist.
>> How to let hadoop/yarn find hadoop-yarn-common-0.23.1.jar?
>> 
>> 
>> 
>> 
>> 
>> At 2012-03-27 19:27:24,"Devaraj k" <de...@huawei.com> wrote:
>>> This is because you haven't set these environment variables.
>>> 
>>> export HADOOP_MAPRED_HOME=<mapred loc>
>>> export HADOOP_COMMON_HOME=<common loc>
>>> export HADOOP_HDFS_HOME=<hdfs loc>
>>> export YARN_HOME=directory where you untarred yarn
>>> export HADOOP_CONF_DIR=<conf loc>
>>> export YARN_CONF_DIR=$HADOOP_CONF_DIR
>>> 
>>> Can you add the above to environment variables and check?
>>> 
>>> Thanks
>>> Devaraj
>>> 
>>> 
>>> ________________________________________
>>> From: muzhu88 [muzhu88@163.com]
>>> Sent: Tuesday, March 27, 2012 4:41 PM
>>> To: common-issues@hadoop.apache.org
>>> Subject: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>>> 
>>> Thanks for your help.
>>> The content of /tmp/log/application_xxx/container_xxx/stderr is:
>>> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>> Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>> at java.security.AccessController.doPrivileged(Native Method)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>> ... 12 more
>>> Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>>>> Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>>>> 
>>>> Thanks
>>>> Devaraj
>>>> ________________________________________
>>>> From: muzhu88 [muzhu88@163.com]
>>>> Sent: Tuesday, March 27, 2012 12:04 PM
>>>> To: common-issues@hadoop.apache.org
>>>> Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>>>> 
>>>> Hello,
>>>> I setup a one node cluster, and deadons run fine.
>>>> 
>>>> However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>>>> 
>>>> But the job failed, and the info shows:
>>>> 
>>>> 12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>>>> 12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>>>> 12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>>>> 12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>>>> 12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>>>> 12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>>>> 12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>>>> 12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>>>> 12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>>>> 12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>>>> 12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>>>> 12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>>>> .Failing this attempt.. Failing the application.
>>>> 12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>>>> 
>>>> What's the cause of "AM Container" exit?
>

Re: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by Vinod Kumar Vavilapalli <vi...@hortonworks.com>.
Make sure that you export these variables *before* you run ResourceManager, NodeManager and the client.

Also (as of now) HADOOP_MAPRED_HOME and YARN_HOME should be pointing to the same directory.

HTH,
+Vinod


On Mar 27, 2012, at 9:26 AM, muzhu88 wrote:

> After setting these environment variables, the error still exist.
> How to let hadoop/yarn find hadoop-yarn-common-0.23.1.jar?
> 
> 
> 
> 
> 
> At 2012-03-27 19:27:24,"Devaraj k" <de...@huawei.com> wrote:
>> This is because you haven't set these environment variables.
>> 
>> export HADOOP_MAPRED_HOME=<mapred loc>
>> export HADOOP_COMMON_HOME=<common loc>
>> export HADOOP_HDFS_HOME=<hdfs loc>
>> export YARN_HOME=directory where you untarred yarn
>> export HADOOP_CONF_DIR=<conf loc>
>> export YARN_CONF_DIR=$HADOOP_CONF_DIR
>> 
>> Can you add the above to environment variables and check?
>> 
>> Thanks
>> Devaraj
>> 
>> 
>> ________________________________________
>> From: muzhu88 [muzhu88@163.com]
>> Sent: Tuesday, March 27, 2012 4:41 PM
>> To: common-issues@hadoop.apache.org
>> Subject: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>> 
>> Thanks for your help.
>> The content of /tmp/log/application_xxx/container_xxx/stderr is:
>> Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>> Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>> ... 12 more
>> Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.
>> 
>> 
>> 
>> 
>> 
>> At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>>> Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>>> 
>>> Thanks
>>> Devaraj
>>> ________________________________________
>>> From: muzhu88 [muzhu88@163.com]
>>> Sent: Tuesday, March 27, 2012 12:04 PM
>>> To: common-issues@hadoop.apache.org
>>> Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>>> 
>>> Hello,
>>> I setup a one node cluster, and deadons run fine.
>>> 
>>> However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>>> 
>>> But the job failed, and the info shows:
>>> 
>>> 12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>>> 12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>>> 12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>>> 12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>>> 12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>>> 12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>>> 12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>>> 12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>>> 12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>>> 12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>>> 12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>>> 12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>>> .Failing this attempt.. Failing the application.
>>> 12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>>> 
>>> What's the cause of "AM Container" exit?


RE: Re:RE: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by Devaraj k <de...@huawei.com>.
Please cross check those variables are set properly.

Please go through these steps and check all are set. http://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-mapreduce-project/INSTALL

Thanks
Devaraj
________________________________________
From: muzhu88 [muzhu88@163.com]
Sent: Tuesday, March 27, 2012 9:56 PM
To: common-issues@hadoop.apache.org
Subject: Re:RE: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

After setting these environment variables, the error still exist.
How to let hadoop/yarn find hadoop-yarn-common-0.23.1.jar?





At 2012-03-27 19:27:24,"Devaraj k" <de...@huawei.com> wrote:
>This is because you haven't set these environment variables.
>
>export HADOOP_MAPRED_HOME=<mapred loc>
>export HADOOP_COMMON_HOME=<common loc>
>export HADOOP_HDFS_HOME=<hdfs loc>
>export YARN_HOME=directory where you untarred yarn
>export HADOOP_CONF_DIR=<conf loc>
>export YARN_CONF_DIR=$HADOOP_CONF_DIR
>
>Can you add the above to environment variables and check?
>
>Thanks
>Devaraj
>
>
>________________________________________
>From: muzhu88 [muzhu88@163.com]
>Sent: Tuesday, March 27, 2012 4:41 PM
>To: common-issues@hadoop.apache.org
>Subject: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>
>Thanks for your help.
>The content of /tmp/log/application_xxx/container_xxx/stderr is:
>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
>at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>... 12 more
>Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.
>
>
>
>
>
>At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>>Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>>
>>Thanks
>>Devaraj
>>________________________________________
>>From: muzhu88 [muzhu88@163.com]
>>Sent: Tuesday, March 27, 2012 12:04 PM
>>To: common-issues@hadoop.apache.org
>>Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>>
>>Hello,
>>I setup a one node cluster, and deadons run fine.
>>
>>However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>>
>>But the job failed, and the info shows:
>>
>>12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>>12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>>12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>>12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>>12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>>12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>>12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>>12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>>12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>>12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>>.Failing this attempt.. Failing the application.
>>12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>>
>>What's the cause of "AM Container" exit?

Re:RE: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by muzhu88 <mu...@163.com>.
After setting these environment variables, the error still exist.
How to let hadoop/yarn find hadoop-yarn-common-0.23.1.jar?





At 2012-03-27 19:27:24,"Devaraj k" <de...@huawei.com> wrote:
>This is because you haven't set these environment variables.
>
>export HADOOP_MAPRED_HOME=<mapred loc>
>export HADOOP_COMMON_HOME=<common loc>
>export HADOOP_HDFS_HOME=<hdfs loc>
>export YARN_HOME=directory where you untarred yarn
>export HADOOP_CONF_DIR=<conf loc>
>export YARN_CONF_DIR=$HADOOP_CONF_DIR
>
>Can you add the above to environment variables and check?
>
>Thanks
>Devaraj
>
>
>________________________________________
>From: muzhu88 [muzhu88@163.com]
>Sent: Tuesday, March 27, 2012 4:41 PM
>To: common-issues@hadoop.apache.org
>Subject: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>
>Thanks for your help.
>The content of /tmp/log/application_xxx/container_xxx/stderr is:
>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
>at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>... 12 more
>Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.
>
>
>
>
>
>At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>>Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>>
>>Thanks
>>Devaraj
>>________________________________________
>>From: muzhu88 [muzhu88@163.com]
>>Sent: Tuesday, March 27, 2012 12:04 PM
>>To: common-issues@hadoop.apache.org
>>Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>>
>>Hello,
>>I setup a one node cluster, and deadons run fine.
>>
>>However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>>
>>But the job failed, and the info shows:
>>
>>12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>>12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>>12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>>12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>>12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>>12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>>12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>>12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>>12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>>12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>>.Failing this attempt.. Failing the application.
>>12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>>
>>What's the cause of "AM Container" exit?

RE: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by Devaraj k <de...@huawei.com>.
This is because you haven't set these environment variables.

export HADOOP_MAPRED_HOME=<mapred loc>
export HADOOP_COMMON_HOME=<common loc>
export HADOOP_HDFS_HOME=<hdfs loc>
export YARN_HOME=directory where you untarred yarn
export HADOOP_CONF_DIR=<conf loc>
export YARN_CONF_DIR=$HADOOP_CONF_DIR

Can you add the above to environment variables and check?

Thanks
Devaraj


________________________________________
From: muzhu88 [muzhu88@163.com]
Sent: Tuesday, March 27, 2012 4:41 PM
To: common-issues@hadoop.apache.org
Subject: Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Thanks for your help.
The content of /tmp/log/application_xxx/container_xxx/stderr is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.





At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>
>Thanks
>Devaraj
>________________________________________
>From: muzhu88 [muzhu88@163.com]
>Sent: Tuesday, March 27, 2012 12:04 PM
>To: common-issues@hadoop.apache.org
>Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>
>Hello,
>I setup a one node cluster, and deadons run fine.
>
>However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>
>But the job failed, and the info shows:
>
>12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>.Failing this attempt.. Failing the application.
>12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>
>What's the cause of "AM Container" exit?

Re:RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by muzhu88 <mu...@163.com>.
Thanks for your help.
The content of /tmp/log/application_xxx/container_xxx/stderr is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/yarn/service/CompositeService
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.yarn.service.CompositeService
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
Could not find the main class: org.apache.hadoop.mapreduce.v2.app.MRAppMaster.  Program will exit.





At 2012-03-27 16:15:29,"Devaraj k" <de...@huawei.com> wrote:
>Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.
>
>Thanks
>Devaraj
>________________________________________
>From: muzhu88 [muzhu88@163.com]
>Sent: Tuesday, March 27, 2012 12:04 PM
>To: common-issues@hadoop.apache.org
>Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1
>
>Hello,
>I setup a one node cluster, and deadons run fine.
>
>However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out
>
>But the job failed, and the info shows:
>
>12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
>12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
>12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
>12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
>12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
>12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
>12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
>12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
>12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
>12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
>12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
>.Failing this attempt.. Failing the application.
>12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0
>
>What's the cause of "AM Container" exit?

RE: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Posted by Devaraj k <de...@huawei.com>.
Can you check the container logs, why the AM container failed? By default container logs present in /tmp/logs directory.

Thanks
Devaraj
________________________________________
From: muzhu88 [muzhu88@163.com]
Sent: Tuesday, March 27, 2012 12:04 PM
To: common-issues@hadoop.apache.org
Subject: Hadoop 0.23.1 Application failed due to AM Container exited with exitCode 1

Hello,
I setup a one node cluster, and deadons run fine.

However, when running randomwriter as: bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-0.23.1.jar randomwriter out

But the job failed, and the info shows:

12/03/27 12:40:46 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
12/03/27 12:40:46 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
12/03/27 12:40:46 INFO input.FileInputFormat: Total input paths to process : 1
12/03/27 12:40:47 INFO util.NativeCodeLoader: Loaded the native-hadoop library
12/03/27 12:40:47 WARN snappy.LoadSnappy: Snappy native library not loaded
12/03/27 12:40:47 INFO mapreduce.JobSubmitter: number of splits:1
12/03/27 12:40:48 INFO mapred.ResourceMgrDelegate: Submitted application application_1332808963273_0004 to ResourceManager at localhost/127.0.0.1:8040
12/03/27 12:40:48 INFO mapreduce.Job: The url to track the job: http://myubuntu:8088/proxy/application_1332808963273_0004/
12/03/27 12:40:48 INFO mapreduce.Job: Running job: job_1332808963273_0004
12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 running in uber mode : false
12/03/27 12:40:51 INFO mapreduce.Job:  map 0% reduce 0%
12/03/27 12:40:51 INFO mapreduce.Job: Job job_1332808963273_0004 failed with state FAILED due to: Application application_1332808963273_0004 failed 1 times due to AM Container for appattempt_1332808963273_0004_000001 exited with  exitCode: 1 due to:
.Failing this attempt.. Failing the application.
12/03/27 12:40:51 INFO mapreduce.Job: Counters: 0

What's the cause of "AM Container" exit?