Exception from container-launch:

14/09/03 13:58:27 INFO mapreduce.Job: Job job_1409723648502_0001 failed with state FAILED due to: Application application_1409723648502_0001 failed 2 times due to AM Container for appattempt_1409723648502_0001_000002 exited with  exitCode: 1 due to: Exception from container-launch:
org.apache.hadoop.util.Shell$ExitCodeException:
 at org.apache.hadoop.util.Shell.runCommand(Shell.java:464)
 at org.apache.hadoop.util.Shell.run(Shell.java:379)
 at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:589)
 at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:195)
 at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:283)
 at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:79)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)


If you are getting "Exception from container-launch:org.apache.hadoop.util.Shell$ExitCodeException" in FAILED application's Diagnostics (or Command prompt) and "java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService" in 'stderr' containerlogs while running any Hadoop example on Windows, then add all the required Hadoop jars to the property 'yarn.application.classpath' in yarn-site.xml configuration file.


解决方案:  在yarn-site.xml里添加如下配置项

<property>
     <name>yarn.application.classpath</name>
     <value>
         $HADOOP_CONF_DIR,
         $HADOOP_COMMON_HOME/share/hadoop/common/*,
         $HADOOP_COMMON_HOME/share/hadoop/common/lib/*,
         $HADOOP_COMMON_HOME/share/hadoop/hdfs/*,
         $HADOOP_COMMON_HOME/share/hadoop/hdfs/lib/*,
         $HADOOP_COMMON_HOME/share/hadoop/mapreduce/*,
         $HADOOP_COMMON_HOME/share/hadoop/mapreduce/lib/*,
         $HADOOP_COMMON_HOME/share/hadoop/yarn/*,
         $HADOOP_COMMON_HOME/share/hadoop/yarn/lib/*
        <!--/app/hadoop/hadoop220-->
    </value>
  </property>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值