运行简单的YARN应用程序时出现以下异常,如何获得更多信息来调试问题?

Oct 14, 2014 12:29:19 PM dz.lab.yarn.simple.handler.RMCallbackHandler onContainersCompleted
INFO: container 'container_1410790353365_0036_02_000002' status is ContainerStatus: [ContainerId: container_1410790353365_0036_02_000002, State: COMPLETE, Diagnostics: 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:745)

什么是

最佳答案

您可以从容器的日志中获取更多信息。

您可以通过以下方式查看容器的日志:

  • 从RM的UI(http://_rm_hostname_>:8088)。此处有更多详细信息:
    http://hadooptutorial.info/tracing-logs-through-yarn-web-ui/
  • 通过控制台命令:“yarn logs -applicationId”
  • 手动在以下位置找到日志:

  • a)如果禁用聚合(日志将位于运行容器的本地目录中):
    $ HADOOP_HOME $ / logs / userlogs / application_1490965385045_0002 /

    b)如果启用了聚合(日志将位于HDFS中):
    / tmp / logs / username> / logs / application_1490965385045_0002 / _node_name_>

    关于java - Yarn容器上的ExitCodeException,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26358624/

    10-12 23:02