【问题标题】:spark-submit cluster mode is not workingspark-submit 集群模式不起作用
【发布时间】:2015-03-03 08:35:41
【问题描述】:

在集群模式下启动独立 Spark 驱动程序时出错。根据文档,请注意 Spark 1.2.1 版本支持集群模式。但是,它目前对我来说无法正常工作。请帮助我解决妨碍 Spark 正常运行的问题。
我有 3 个节点 spark 集群 node1 , node2 和 node 3

I running below command on node 1 for deploying driver

/usr/local/spark-1.2.1-bin-hadoop2.4/bin/spark-submit --class com.fst.firststep.aggregator.FirstStepMessageProcessor --master spark://ec2-xx-xx-xx-xx.compute-1.amazonaws.com:7077 --deploy-mode cluster --supervise file:///home/xyz/sparkstreaming-0.0.1-SNAPSHOT.jar /home/xyz/config.properties

driver gets launched on node 2 in cluster. but getting exception on node 2 that it is trying to bind to node 1 ip.

2015-02-26 08:47:32 DEBUG AkkaUtils:63 - In createActorSystem, requireCookie is: off 
2015-02-26 08:47:32 INFO  Slf4jLogger:80 - Slf4jLogger started 
2015-02-26 08:47:33 ERROR NettyTransport:65 - failed to bind to ec2-xx.xx.xx.xx.compute-1.amazonaws.com/xx.xx.xx.xx:0, shutting down Netty transport 
2015-02-26 08:47:33 WARN  Utils:71 - Service 'Driver' could not bind on port 0. Attempting port 1. 
2015-02-26 08:47:33 DEBUG AkkaUtils:63 - In createActorSystem, requireCookie is: off 
2015-02-26 08:47:33 ERROR Remoting:65 - Remoting error: [Startup failed] [ 
akka.remote.RemoteTransportException: Startup failed 
        at akka.remote.Remoting.akka$remote$Remoting$$notifyError(Remoting.scala:136) 
        at akka.remote.Remoting.start(Remoting.scala:201) 
        at akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:184) 
        at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:618) 
        at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:615) 
        at akka.actor.ActorSystemImpl._start(ActorSystem.scala:615) 
        at akka.actor.ActorSystemImpl.start(ActorSystem.scala:632) 
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:141) 
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:118) 
        at org.apache.spark.util.AkkaUtils$.org$apache$spark$util$AkkaUtils$$doCreateActorSystem(AkkaUtils.scala:121) 
        at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:54) 
        at org.apache.spark.util.AkkaUtils$$anonfun$1.apply(AkkaUtils.scala:53) 
        at org.apache.spark.util.Utils$$anonfun$startServiceOnPort$1.apply$mcVI$sp(Utils.scala:1765) 
        at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141) 
        at org.apache.spark.util.Utils$.startServiceOnPort(Utils.scala:1756) 
        at org.apache.spark.util.AkkaUtils$.createActorSystem(AkkaUtils.scala:56) 
        at org.apache.spark.deploy.worker.DriverWrapper$.main(DriverWrapper.scala:33) 
        at org.apache.spark.deploy.worker.DriverWrapper.main(DriverWrapper.scala) 
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: ec2-xx-xx-xx.compute-1.amazonaws.com/xx.xx.xx.xx:0 
        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) 
        at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:393) 
        at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389) 
        at scala.util.Success$$anonfun$map$1.apply(Try.scala:206) 
        at scala.util.Try$.apply(Try.scala:161) 
        at scala.util.Success.map(Try.scala:206) 
kindly suggest

Thanks`enter code here`

【问题讨论】:

  • 在提交作业时尝试添加 -Dspark.driver.port=3210(或任何其他端口)

标签: apache-spark


【解决方案1】:

无法绑定到端口 0。您的 spark 配置存在错误。具体看

spark.webui.port

它可能设置为 0。

【讨论】:

    猜你喜欢
    • 2015-04-30
    • 2016-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-10
    • 2018-10-25
    • 2017-03-03
    相关资源
    最近更新 更多