简体   繁体   English

我在EMR群集主服务器上运行的python作业失败,该如何解决?

[英]My python job I run on the master of EMR cluster fails, how do I troubleshoot?

I ssh to the master and run my hadoop job on the console for development purposes. 我向主服务器SSH并在控制台上运行我的hadoop作业以进行开发。 My job fails in a mysterious way, with many java stack traces that make no sense to me, see below: 我的工作以一种神秘的方式失败了,有许多对我来说毫无意义的java堆栈跟踪,请参见下文:

java.lang.RuntimeException: PipeMapRed.waitOutputThreads(): subprocess failed with code 143
at org.apache.hadoop.streaming.PipeMapRed.waitOutputThreads(PipeMapRed.java:322)
at org.apache.hadoop.streaming.PipeMapRed.mapRedFinished(PipeMapRed.java:535)
at org.apache.hadoop.streaming.PipeMapper.map(PipeMapper.java:120)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.streaming.PipeMapRunner.run(PipeMapRunner.java:34)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:455)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:344)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)

Look at the logs for an error in your python code. 在日志中查看python代码中的错误。 For EMR/yarn you can find your logs from the WEB UI or on the cluster master shell as shown below (your application id will differ it is printed when the jobs starts). 对于EMR /纱线,您可以从WEB UI或群集主外壳上找到日志,如下所示(您的应用程序ID会有所不同,在作业开始时会打印出来)。 There is a lot of output, redirect it into a file as I show and search for python stack traces to see what went wrong with your app. 有很多输出,如图所示,将其重定向到文件中,并搜索python堆栈跟踪以查看您的应用出了什么问题。 All these stack traces usually indicate that at least one reduce process failed but the stderr of the process is not shown in the CLI/shell output. 所有这些堆栈跟踪通常都表明至少有一个reduce进程失败了,但是该进程的stderr没有显示在CLI / shell输出中。

$ yarn logs -applicationId application_1503951120983_0031 > /tmp/log 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM