当前位置:首页 > 开发 > 开源软件 > 正文

解决Exception from container-launch: ExitCodeException exitCode=1的另类错误

发表于: 2014-08-21   作者:BlackWing   来源:转载   浏览:
摘要: 转载请标明出处:http://blackwing.iteye.com/blog/2107107 环境为hadoop2.2,在linux下运行自己的job,报如下错误: Exception from container-launch: ExitCodeException exitCode=1: ExitCodeException exitCode=1: at
转载请标明出处:http://blackwing.iteye.com/blog/2107107

环境为hadoop2.2,在linux下运行自己的job,报如下错误:

Exception from container-launch: ExitCodeException exitCode=1: 
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:702)
        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:300)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:81)
        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


但运行自带wordcount却能正常执行。google了很久,无非都是建议在mapred-site.xml中增加:
<property>
       <name>mapreduce.application.classpath</name>
       <value>
            /usr/local/cluster/hadoop-2.2.0/etc/hadoop,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/common/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/common/lib/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/hdfs/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/hdfs/lib/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/mapreduce/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/mapreduce/lib/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/yarn/*,
            /usr/local/cluster/hadoop-2.2.0/share/hadoop/yarn/lib/*
       </value>
</property>

但是问题依旧。从log中发现一个奇怪的输出:
Improperly specified VM option 'PretenureSizeThreshold'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

立刻想到自己设置的mapred.child.java.opts参数,其中就有PretenureSizeThreshold,原来是不支持这个参数导致。修改后就能正确运行,居然折腾了很久。

解决Exception from container-launch: ExitCodeException exitCode=1的另类错误

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号