zookeeper出现Error contacting service. It is probably not running.

在两个节点 的zookeeper搭建启动的时候出现如下报错
JMX enabled by default
Using config: /root/app/zookeeper/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

查看zookeeper.out 日志报错如下

2018-06-13 03:13:18,573 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 1 (n.leader), 0x0 (n.zxid), 0x9 (n.round), LEADING (n.state), 1 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:19,375 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 0 (n.leader), 0x0 (n.zxid), 0xa (n.round), LOOKING (n.state), 0 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:19,376 [myid:0] - INFO  [QuorumPeer[myid=0]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@774] - Notification time out: 1600
2018-06-13 03:13:19,379 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 1 (n.leader), 0x0 (n.zxid), 0x9 (n.round), LEADING (n.state), 1 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:20,981 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 0 (n.leader), 0x0 (n.zxid), 0xa (n.round), LOOKING (n.state), 0 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:20,983 [myid:0] - INFO  [QuorumPeer[myid=0]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@774] - Notification time out: 3200
2018-06-13 03:13:20,985 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 1 (n.leader), 0x0 (n.zxid), 0x9 (n.round), LEADING (n.state), 1 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:24,187 [myid:0] - INFO  [QuorumPeer[myid=0]/0:0:0:0:0:0:0:0:2181:FastLeaderElection@774] - Notification time out: 6400
2018-06-13 03:13:24,188 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 0 (n.leader), 0x0 (n.zxid), 0xa (n.round), LOOKING (n.state), 0 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
2018-06-13 03:13:24,192 [myid:0] - INFO  [WorkerReceiver[myid=0]:FastLeaderElection@542] - Notification: 1 (n.leader), 0x0 (n.zxid), 0x9 (n.round), LEADING (n.state), 1 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state)
原因是另外一个节点上的防火墙没有关闭,导致请求地址时,报错!
在另外一个节点上 关闭防火墙:
service iptables stop

你可能感兴趣的:(Spark)