分享

Spark HA配置报错

唐运 发表于 2014-12-24 17:38:16 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 5 61185

14/12/24 17:19:12 INFO master.Master: Registered signal handlers for [TERM, HUP, INT]
14/12/24 17:19:12 INFO spark.SecurityManager: Changing view acls to: hdfs
14/12/24 17:19:12 INFO spark.SecurityManager: Changing modify acls to: hdfs
14/12/24 17:19:12 INFO spark.SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users with view permissions: Set(hdfs); users with modify permissions: Set(hdfs)
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:13 WARN util.Utils: Service 'sparkMaster' could not bind on port 7077. Attempting port 7078.
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:13 WARN util.Utils: Service 'sparkMaster' could not bind on port 7078. Attempting port 7079.
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:13 WARN util.Utils: Service 'sparkMaster' could not bind on port 7079. Attempting port 7080.
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:13 WARN util.Utils: Service 'sparkMaster' could not bind on port 7080. Attempting port 7081.
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:13 WARN util.Utils: Service 'sparkMaster' could not bind on port 7081. Attempting port 7082.
14/12/24 17:19:13 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:13 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7082. Attempting port 7083.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7083. Attempting port 7084.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7084. Attempting port 7085.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7085. Attempting port 7086.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7086. Attempting port 7087.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7087. Attempting port 7088.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7088. Attempting port 7089.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7089. Attempting port 7090.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7090. Attempting port 7091.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7091. Attempting port 7092.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
14/12/24 17:19:14 WARN util.Utils: Service 'sparkMaster' could not bind on port 7092. Attempting port 7093.
14/12/24 17:19:14 INFO slf4j.Slf4jLogger: Slf4jLogger started
14/12/24 17:19:14 INFO Remoting: Starting remoting
Exception in thread "main" java.net.BindException: Failed to bind to: /192.168.154.101:7093: Service 'sparkMaster' failed after 16 retries!
        at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
        at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:391)
        at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:388)
        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)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
        at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)


以上是报错信息。
环境介绍:
主节点:start-all.sh已经启动了,但是另一个主节点start-master.sh启动时会出现错误。
哪位大神帮忙讲解下,万分感谢。

spark-env.sh

export SCALA_HOME=/usr/share/scala
export SPARK_WORKER_MEMORY=7g
export SPARK_MASTER_IP=192.168.154.101
export MASTER=spark://192.168.154.101:7077,192.168.154.102:7077
export SPARK_EXECUTOR_MEMORY=1000M
export SPARK_DRIVER_MEMORY=1000M
export SPARK_JAVA_OPTS='-Dspark.cores.max=6'
export SPARK_DAEMON_JAVA_OPTS='-Dspark.deploy.recoveryMode=ZOOKEEPER -Dspark.deploy.zookeeper.url=192.168.154.101:2181,192.168.154.102:2181,192.168.154.103:2181 -Dspark.deploy.zookeeper.dir=/spark'
export SPARK_LOCAL_DIRS='/data/tmp1,/data/tmp2'
export SPARK_CLASSPATH=/usr/lib/hbase/hbase-0.94.2-cdh4.2.0-security.jar:/usr/lib/zookeeper/zookeeper-3.4.5-cdh4.2.0.jar:/usr/lib/hadoop-0.20-mapreduce/hadoop-core-2.0.0-mr1-cdh4.2.0.jar


已有(5)人评论

跳转到指定楼层
bioger_hit 发表于 2014-12-25 15:33:25
端口出问题了,楼主看看端口是否被暂用了
回复

使用道具 举报

muyannian 发表于 2014-12-25 16:22:44
本帖最后由 muyannian 于 2014-12-25 16:24 编辑

不能将Master定义在conf/spark-env.sh里了,而是直接在Application中定义。涉及的参数是 export SPARK_MASTER_IP=hostname,这项不配置或者为空。否则,无法启动多个master。
回复

使用道具 举报

muyannian 发表于 2014-12-25 16:27:41
楼主采用这种启动方式是试试
MASTER=spark://hostname1:7077,hostname2:7077 bin/spark-shell

回复

使用道具 举报

唐运 发表于 2014-12-30 13:35:49
Master配置为主机名:7077的格式就好了,感谢大家的帮助。
回复

使用道具 举报

唐运 发表于 2015-1-5 11:33:18
还有就是 配置了 export SPARK_MASTER_IP=192.168.154.101,HA环境这个快不需要配置 。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条