阿里云上搭建zookeeper集群,Zookeeper启动失败,报错 Cannot open channel to 3 at election address

                 阿里云上搭建zookeeper集群,Zookeeper启动失败,报错 Cannot open channel to 3 at election address

解决方案:

在每个znode上。我修改了配置文件$ ZOOKEEPER_HOME / conf / zoo.cfg,将机器IP设置为“0.0.0.0”,同时保持其他2个znode的IP地址。见下文

阿里云第一台部署zookeeper1,配置文件server如下:

server.1=0.0.0.0:2888:3888
server.2=120.78.123.192:2888:3888
server.3=192.168.11.108:2888:3888

阿里云第2台部署zookeeper2,配置文件server如下:

server.1=47.106.132.191:2888:3888
server.2=0.0.0.0:2888:3888
server.3=192.168.11.108:2888:3888

本地虚拟机部署zookeeper3.配置文件的server如下:

server.1=47.106.132.191:2888:3888
server.2=120.78.123.192:2888:3888
server.3=192.168.11.108:2888:3888

本文参考:https://stackoverflow.com/questions/30940981/zookeeper-error-cannot-open-channel-to-x-at-election-address

你可能感兴趣的:(zookeeper)