【问题标题】:Hadoop Wordcount example failing due to AM containerHadoop Wordcount 示例因 AM 容器而失败
【发布时间】:2017-03-30 06:47:31
【问题描述】:

我一直在尝试运行 hadoop wordcount 示例一段时间,但是我遇到了一些问题。我有 hadoop 2.7.1 并在 Windows 上运行它。以下是错误详情:

命令:

yarn jar C:\hadoop-2.7.1\share\hadoop\mapreduce\hadoop-mapreduce-examples-2.7.1.jar wordcount input output

输出:

INFO input.FileInputFormat: Total input paths to process : 1
INFO mapreduce.JobSubmitter: number of splits:1
INFO mapreduce.JobSubmitter: Submitting tokens for job: job_14
90853163147_0009
INFO impl.YarnClientImpl: Submitted application application_14
90853163147_0009
INFO mapreduce.Job: The url to track the job: http://*****
*****/proxy/application_1490853163147_0009/
INFO mapreduce.Job: Running job: job_1490853163147_0009
INFO mapreduce.Job: Job job_1490853163147_0009 running in uber
 mode : false
INFO mapreduce.Job:  map 0% reduce 0%
INFO mapreduce.Job: Job job_1490853163147_0009 failed with sta
te FAILED due to: Application application_1490853163147_0009 failed 2 times due
to AM Container for appattempt_1490853163147_0009_000002 exited with  exitCode:
1639
For more detailed output, check application tracking page:http://********
:****/cluster/app/application_1490853163147_0009Then, click on links to logs of
each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1490853163147_0009_02_000001
Exit code: 1639
Exception message: Incorrect command line arguments.


Stack trace: ExitCodeException exitCode=1639: Incorrect command line arguments.


        at org.apache.hadoop.util.Shell.runCommand(Shell.java:545)
        at org.apache.hadoop.util.Shell.run(Shell.java:456)
        at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:
722)
        at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.la
unchContainer(DefaultContainerExecutor.java:211)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.C
ontainerLaunch.call(ContainerLaunch.java:302)
        at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.C
ontainerLaunch.call(ContainerLaunch.java:82)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
        at java.lang.Thread.run(Thread.java:745)

Shell output:     Usage: task create [TASKNAME] [COMMAND_LINE] |
          task isAlive [TASKNAME] |
          task kill [TASKNAME]
          task processList [TASKNAME]
    Creates a new task jobobject with taskname
    Checks if task jobobject is alive
    Kills task jobobject
    Prints to stdout a list of processes in the task
    along with their resource usage. One process per line
    and comma separated info per process
    ProcessId,VirtualMemoryCommitted(bytes),
    WorkingSetSize(bytes),CpuTime(Millisec,Kernel+User)


Container exited with a non-zero exit code 1639
Failing this attempt. Failing the application.
INFO mapreduce.Job: Counters: 0

Yarn-site.xml:

<configuration>
<property>
       <name>yarn.application.classpath</name>
       <value>
            C:\hadoop-2.7.1\etc\hadoop,
            C:\hadoop-2.7.1\share\hadoop\common\*,
            C:\hadoop-2.7.1\share\hadoop\common\lib\*,
            C:\hadoop-2.7.1\share\hadoop\hdfs\*,
            C:\hadoop-2.7.1\share\hadoop\hdfs\lib\*,
            C:\hadoop-2.7.1\share\hadoop\mapreduce\*,
            C:\hadoop-2.7.1\share\hadoop\mapreduce\lib\*,
            C:\hadoop-2.7.1\share\hadoop\yarn\*,
            C:\hadoop-2.7.1\share\hadoop\yarn\lib\*
       </value>
    </property>
  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
  <property>
        <name>yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage</name>
        <value>98.5</value>
</property>
<property>
  <name>yarn.nodemanager.resource.memory-mb</name>
  <value>2200</value>
  <description>Amount of physical memory, in MB, that can be allocated for containers.</description>
</property>

<property>
  <name>yarn.scheduler.minimum-allocation-mb</name>
  <value>500</value>
</property>
<property>
    <name>yarn.log-aggregation-enable</name>
    <value>true</value>
</property>

<property>
    <description>Where to aggregate logs to.</description>
    <name>yarn.nodemanager.remote-app-log-dir</name>
    <value>/tmp/logs</value>
</property>

<property>
    <name>yarn.log-aggregation.retain-seconds</name>
    <value>259200</value>
</property>

<property>
    <name>yarn.log-aggregation.retain-check-interval-seconds</name>
    <value>3600</value>
</property>
</configuration>

ma​​pred.xml:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License. See accompanying LICENSE file.
-->

<!-- Put site-specific property overrides in this file. -->

<configuration>
  <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
</configuration>

知道出了什么问题吗?

【问题讨论】:

  • 你得到了解决方案

标签: windows hadoop mapreduce hadoop-yarn


【解决方案1】:

exitCode: 1639 看起来您正在 Windows 上运行 hadoop。

https://github.com/OctopusDeploy/Issues/issues/1346

【讨论】:

  • 这如何回答上面的问题? OP 已经提到它是在 Windows 上配置的。
  • 是的,正如我所说,我在 Windows 上运行它。我尝试了很多修复,但这个错误不会消失!
【解决方案2】:

我遇到了完全相同的问题。在实际安装 Hadoop 2.8.0 时,我遵循了有关如何安装 Hadoop 2.6.0 (http://www.ics.uci.edu/~shantas/Install_Hadoop-2.6.0_on_Windows10.pdf) 的指南。 完成后我就跑了

hadoop jar D:\hadoop-2.8.0\share\hadoop\mapreduce\hadoop-mapreduce-examples-2.8.0.jar wordcount /foo/bar/LICENSE.txt /out1

并且得到(来自 yarn nodemanager 的日志):

17/06/19 13:15:30 INFO monitor.ContainersMonitorImpl:开始对 container_1497902417767_0004_01_000001 进行资源监控

17/06/19 13:15:30 信息 nodemanager.DefaultContainerExecutor:launchContainer:[D:\hadoop-2.8.0\bin\winutils.exe,任务,创建,-m,-1,-c,- 1、container_1497902417767_0004_01_000001、cmd /c D:/hadoop/temp/nm-localdir/usercache/******/appcache/application_1497902417767_0004/container_1497902417767_0004_01_000001/default_container_executor.cmd]

17/06/19 13:15:30 WARN nodemanager.DefaultContainerExecutor:容器 container_1497902417767_0004_01_000001 的退出代码为:1639

17/06/19 13:15:30 WARN nodemanager.DefaultContainerExecutor:容器启动异常,容器 ID:container_1497902417767_0004_01_000001 和退出代码:1639

ExitCodeException exitCode=1639:命令行参数不正确。

TaskExit:错误 (1639):命令行参数无效。有关详细的命令行帮助,请参阅 Windows Installer SDK。

另一个症状是(来自 yarn nodemanager 的日志):

17/06/19 13:25:49 WARN util.SysInfoWindows:sysInfo 的预期拆分长度为 11。得到 7

解决方案是兼容(与 Hadoop 2.8.0)二进制文件:https://github.com/steveloughran/winutils/tree/master/hadoop-2.8.0-RC3/bin

获得正确的 winutils.exe 后,我的问题就消失了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-10
    相关资源
    最近更新 更多