Amazon Web Service - EMR - 端口42560上的连接被拒绝

时间:2018-02-05 21:14:38

标签: amazon-web-services apache-spark yarn emr amazon-emr

我在Amazon Web Services上使用EMR(发行标签:emr-5.8.0)时出现了间歇性问题。我运行以下服务:

  • Hadoop的
  • 纱线
  • 蜂房
  • Sqoop
  • 火花
  • Hive on Spark

错误如下

Connection refused: ip-10-128-196-59/10.128.196.59:42560

完整堆栈跟踪是:

  

18:28:59.495 [Driver] ERROR   org.apache.spark.deploy.yarn.ApplicationMaster - 用户类扔了   异常:java.util.concurrent.ExecutionException:   io.netty.channel.AbstractChannel $ AnnotatedConnectException:Connection   拒绝:ip-10-128-196-59 / 10.128.196.59:42560   java.util.concurrent.ExecutionException:   io.netty.channel.AbstractChannel $ AnnotatedConnectException:Connection   拒绝:ip-10-128-196-59 / 10.128.196.59:42560 at   io.netty.util.concurrent.AbstractFuture.get(AbstractFuture.java:41)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   org.apache.hive.spark.client.RemoteDriver。(RemoteDriver.java:145)   〜[hive-exec-2.3.0-amzn-0.jar:2.3.0-amzn-0] at   org.apache.hive.spark.client.RemoteDriver.main(RemoteDriver.java:516)   〜[hive-exec-2.3.0-amzn-0.jar:2.3.0-amzn-0] at   sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)   〜[?:1.8.0_141] at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   〜[?:1.8.0_141] at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   〜[?:1.8.0_141] at java.lang.reflect.Method.invoke(Method.java:498)   〜[?:1.8.0_141] at   org.apache.spark.deploy.yarn.ApplicationMaster $$匿名$ 2.run(ApplicationMaster.scala:635)   [spark-yarn_2.11-2.2.0.jar:2.2.0]引起:   io.netty.channel.AbstractChannel $ AnnotatedConnectException:Connection   拒绝:ip-10-128-196-59 / 10.128.196.59:42560 at   sun.nio.ch.SocketChannelImpl.checkConnect(本机方法)   〜[?:1.8.0_141] at   sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)   〜[?:1.8.0_141] at   io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:257)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:291)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:631)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:566)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.util.concurrent.SingleThreadEventExecutor $ 2.run(SingleThreadEventExecutor.java:131)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   java.lang.Thread.run(Thread.java:748)~ [?:1.8.0_141] 18:28:59.511   [主要] ERROR org.apache.spark.deploy.yarn.ApplicationMaster - Uncaught   exception:org.apache.spark.SparkException:抛出异常   awaitResult:at   org.apache.spark.util.ThreadUtils $ .awaitResult(ThreadUtils.scala:205)   〜[spark-core_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.yarn.ApplicationMaster.runDriver(ApplicationMaster.scala:401)   [spark-yarn_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.yarn.ApplicationMaster.run(ApplicationMaster.scala:254)   [spark-yarn_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.yarn.ApplicationMaster $$ anonfun $主$ 1.适用$ MCV $ SP(ApplicationMaster.scala:764)   [spark-yarn_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.SparkHadoopUtil $$匿名$ 2.run(SparkHadoopUtil.scala:67)   [spark-core_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.SparkHadoopUtil $$匿名$ 2.run(SparkHadoopUtil.scala:66)   [spark-core_2.11-2.2.0.jar:2.2.0] at   java.security.AccessController.doPrivileged(本机方法)   〜[?:1.8.0_141]在javax.security.auth.Subject.doAs(Subject.java:422)   [?:1.8.0_141] at   org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)   [hadoop-common-2.7.3-amzn-3.jar:?] at   org.apache.spark.deploy.SparkHadoopUtil.runAsSparkUser(SparkHadoopUtil.scala:66)   [spark-core_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.yarn.ApplicationMaster $。主要(ApplicationMaster.scala:762)   [spark-yarn_2.11-2.2.0.jar:2.2.0] at   org.apache.spark.deploy.yarn.ApplicationMaster.main(ApplicationMaster.scala)   [spark-yarn_2.11-2.2.0.jar:2.2.0]引起:   java.util.concurrent.ExecutionException:   io.netty.channel.AbstractChannel $ AnnotatedConnectException:Connection   拒绝:ip-10-128-196-59 / 10.128.196.59:42560 at   io.netty.util.concurrent.AbstractFuture.get(AbstractFuture.java:41)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   org.apache.hive.spark.client.RemoteDriver。(RemoteDriver.java:145)   〜[hive-exec-2.3.0-amzn-0.jar:2.3.0-amzn-0] at   org.apache.hive.spark.client.RemoteDriver.main(RemoteDriver.java:516)   〜[hive-exec-2.3.0-amzn-0.jar:2.3.0-amzn-0] at   sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)   〜[?:1.8.0_141] at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   〜[?:1.8.0_141] at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   〜[?:1.8.0_141] at java.lang.reflect.Method.invoke(Method.java:498)   〜[?:1.8.0_141] at   org.apache.spark.deploy.yarn.ApplicationMaster $$匿名$ 2.run(ApplicationMaster.scala:635)   〜[spark-yarn_2.11-2.2.0.jar:2.2.0]引起:   io.netty.channel.AbstractChannel $ AnnotatedConnectException:Connection   拒绝:ip-10-128-196-59 / 10.128.196.59:42560 at   sun.nio.ch.SocketChannelImpl.checkConnect(本机方法)   〜[?:1.8.0_141] at   sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)   〜[?:1.8.0_141] at   io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:257)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.AbstractNioChannel $ AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:291)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:631)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:566)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   io.netty.util.concurrent.SingleThreadEventExecutor $ 2.run(SingleThreadEventExecutor.java:131)   〜[netty-all-4.0.43.Final.jar:4.0.43.Final] at   java.lang.Thread.run(Thread.java:748)~ [?:1.8.0_141]

在IP 10.128.196.59 的计算机上, 42560 端口上没有任何内容正在运行。我使用了AWS的所有默认设置,很遗憾,我无法找到有关端口 42560 的AWS文档

[编辑] 如果再次运行该进程,端口是不同的?!

1 个答案:

答案 0 :(得分:0)

不是最优雅的解决方案,但使用超时工作。如果您在AWS上,则必须在分类中设置此属性" hive-site":

"hive.spark.client.server.connect.timeout": "360000ms"