首页 > 代码库 > 在配置zookeeper遇到Error contacting service. It is probably not running

在配置zookeeper遇到Error contacting service. It is probably not running

在配置完zookeeper集群后,三个节点,分别启动三个节点如下:

[root@master bin]# zkServer.sh start
JMX enabled by default
Using config: /usr/local/zk/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED



在查看zookeeper状态时遇到


[root@master bin]# zkServer.sh status
JMX enabled by default
Using config: /usr/local/zk/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.


而其他两个节点却是现实正常;最后检查配置zoo.cfg配置发现是该节点的主机名写错了;先停止三个节点zookeeper服务,逐一的修改节点上zoo.cfg配置文件,在逐一的启动 ,结果显示正常;

在配置zookeeper遇到Error contacting service. It is probably not running