zookeeper集群搭建起不起来,求大神解答

哥就是瘦 2018-01-23 12:11:52
首先我确定防火墙关了,myid里面正确,端口没有被占用。附错误信息
2018-01-22 23:54:51,572 [myid:] - INFO [main:QuorumPeerConfig@103] - Reading configuration from: /usr/local/zookeeper/zookeeper01/bin/../conf/zoo.cfg
2018-01-22 23:54:51,576 [myid:] - INFO [main:QuorumPeerConfig@340] - Defaulting to majority quorums
2018-01-22 23:54:51,579 [myid:1] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2018-01-22 23:54:51,579 [myid:1] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2018-01-22 23:54:51,580 [myid:1] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2018-01-22 23:54:51,591 [myid:1] - INFO [main:QuorumPeerMain@127] - Starting quorum peer
2018-01-22 23:54:51,600 [myid:1] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181
2018-01-22 23:54:51,615 [myid:1] - INFO [main:QuorumPeer@959] - tickTime set to 2000
2018-01-22 23:54:51,615 [myid:1] - INFO [main:QuorumPeer@979] - minSessionTimeout set to -1
2018-01-22 23:54:51,615 [myid:1] - INFO [main:QuorumPeer@990] - maxSessionTimeout set to -1
2018-01-22 23:54:51,615 [myid:1] - INFO [main:QuorumPeer@1005] - initLimit set to 10
2018-01-22 23:54:51,630 [myid:1] - INFO [Thread-1:QuorumCnxManager$Listener@504] - My election bind port: slave-01/172.17.0.4:3881
2018-01-22 23:54:51,631 [myid:1] - ERROR [slave-01/172.17.0.4:3881:QuorumCnxManager$Listener@517] - Exception while listening
java.net.BindException: Cannot assign requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:330)
at org.apache.zookeeper.server.quorum.QuorumCnxManager$Listener.run(QuorumCnxManager.java:507)
2018-01-22 23:54:51,638 [myid:1] - INFO [QuorumPeer[myid=1]/0.0.0.0:2181:QuorumPeer@714] - LOOKING
2018-01-22 23:54:51,639 [myid:1] - INFO [QuorumPeer[myid=1]/0.0.0.0:2181:FastLeaderElection@815] - New election. My id = 1, proposed zxid=0x0
2018-01-22 23:54:51,641 [myid:1] - INFO [WorkerReceiver[myid=1]:FastLeaderElection@597] - Notification: 1 (message format version), 1 (n.leader), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state), 1 (n.sid), 0x0 (n.peerEpoch) LOOKING (my state)
"zookeeper.out" 279L, 24203C


搞不懂啥情况,再附上配置文件
#
The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/usr/local/zookeeper/zookeeper01/data
dataLogDir=/usr/local/zookeeper/zookeeper01/zkLog
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=slave-01:2881:3881
server.2=slave-02:2882:3882
server.3=slave-03:2883:3883

求各位大神解答

...全文
645 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
哥就是瘦 2018-01-25
  • 打赏
  • 举报
回复
后来解决了,发现他提示我ip地址连不上,我重新检查了我的ip发现ip错了
幽饮烛 2018-01-24
  • 打赏
  • 举报
回复
系统 socket 连接资源耗尽,不能再创建了,看看是不是TIME_WAIT状态的连接太多了,没有释放。

18,777

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧