首页 > 代码库 > Zookeeper启动失败,报错 can not open chanel to 2

Zookeeper启动失败,报错 can not open chanel to 2

zookeeper 3.4.8 安装在 7 台不同的虚拟机上,配置文件如下:

tickTime=2000initLimit=10syncLimit=5dataDir=/var/zookeeperclientPort=2181server.1=master1:2888:3888server.2=master2:2888:3888server.3=slave1:2888:3888server.4=slave2:2888:3888server.5=slave3:2888:3888server.6=slave4:2888:3888server.7=slave5:2888:3888

myid文件全部配置正确,防火墙已经关闭,但是启动时报出如下错误:

Cannot open channel to 6 at election address slave4......

不仅仅是 slave4,全部的节点都出现这个错误。

经过一番百度,终于在万能的stackoverflow上找到了答案,每个当前节点要把自己的IP地址设置为0.0.0.0

原文链接:http://stackoverflow.com/questions/30940981/zookeeper-error-cannot-open-channel-to-x-at-election-address

Zookeeper启动失败,报错 can not open chanel to 2