首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Yarn MapReduce作业问题-Hadoop2.3.0中的AM容器启动错误

Yarn MapReduce作业问题-Hadoop2.3.0中的AM容器启动错误
EN

Stack Overflow用户
提问于 2014-03-22 23:58:06
回答 11查看 45.7K关注 0票数 19

我已经设置了Hadoop 2.3.0的2节点集群。它工作得很好,我可以成功地运行distributedshell-2.2.0.jar示例。但是当我尝试运行任何mapreduce作业时,我得到了错误。我已经根据(http://www.alexjf.net/blog/distributed-systems/hadoop-yarn-installation-definitive-guide)设置了用于运行MapReduce作业的MapRed.xml和其他配置,但我收到以下错误:

代码语言:javascript
复制
14/03/22 20:31:17 INFO mapreduce.Job: Job job_1395502230567_0001 failed with state FAILED due to: Application application_1395502230567_0001 failed 2 times due to AM Container for appattempt_1395502230567_0001_000002 exited 
with  exitCode: 1 due to: Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException: 
    org.apache.hadoop.util.Shell$ExitCodeException: 
        at org.apache.hadoop.util.Shell.runCommand(Shell.java:505)
        at org.apache.hadoop.util.Shell.run(Shell.java:418)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:650)
        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.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)


    Container exited with a non-zero exit code 1
    .Failing this attempt.. Failing the application.
    14/03/22 20:31:17 INFO mapreduce.Job: Counters: 0
    Job ended: Sat Mar 22 20:31:17 PKT 2014
    The job took 6 seconds.

如果查看stderr (作业日志),则只有一行"Could not find or load main class 614"

现在我已经用谷歌搜索过了,通常当你有不同的JAVA版本或者在yarn-site.xml中没有正确设置类路径时,这个问题就会出现,我的yarn-site.xml就是这样

代码语言:javascript
复制
  <property>
    <name>yarn.application.classpath</name>
    <value>/opt/yarn/hadoop-2.3.0/etc/hadoop,/opt/yarn/hadoop-2.3.0/*,/opt/yarn/hadoop-2.3.0/lib/*,/opt/yarn/hadoop-2.3.0/*,/opt/yarn/hadoop-2.3.0/lib/*,/opt/yarn/hadoop-2.3.0/*,/opt/yarn/hadoop-2.3.0/lib/*,/opt/yarn/hadoop-2.3.0/*,/opt/yarn/hadoop-2.3.0/lib/*</value>
  </property>

那么,还有其他的想法吗?这里的问题可能是什么?

我像这样运行我的mapreduce作业:

代码语言:javascript
复制
$HADOOP_PREFIX/bin/hadoop jar $HADOOP_PREFIX/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.2.0.jar randomwriter out
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22579943

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档