无法在复制模式下设置zookeeper
我正在尝试在具有 3 个服务器的复制节点中设置 Zookeeper。
我的配置文件是这样的
tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888
server.2=zoo2:2888:3888
server.3=zoo3:2888:3888
我收到以下异常
QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@642] - Adding vote
2009-09-23 15:30:28,099 - WARN [WorkerSender Thread:QuorumCnxManager@336] -
Cannot open channel to 3 at election address zoo1/172.21.31.159:3888
java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect(Native Method)> at
sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:
所有端口都打开并且 ssh、telnet 也正常工作。
谢谢
I am trying to set up zookeeper in replicated node with 3 server.
my config file is like this
tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888
server.2=zoo2:2888:3888
server.3=zoo3:2888:3888
I am getting following exception
QuorumPeer:/0:0:0:0:0:0:0:0:2181:FastLeaderElection@642] - Adding vote
2009-09-23 15:30:28,099 - WARN [WorkerSender Thread:QuorumCnxManager@336] -
Cannot open channel to 3 at election address zoo1/172.21.31.159:3888
java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect(Native Method)> at
sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:
All ports are open and ssh, telnet are also working.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个快速清单:
/var/lib/zookeeper/myid
文件吗?Here is a quick checklist:
/var/lib/zookeeper/myid
file?不知道为什么,但我必须在每个服务器的 Zookeeper 配置中使用
0.0.0.0
作为主机名。即:
服务器 1:
myid
zoo.cfg
服务器 2:
myid
zoo.cfg
服务器 3:
myid
zoo.cfg
Not sure why but I had to use
0.0.0.0
as a host name in Zookeeper config for a each of the servers.I.e:
Server 1:
myid
zoo.cfg
Server 2:
myid
zoo.cfg
Server 3:
myid
zoo.cfg