当前位置: 代码迷 >> 综合 >> Zookeeper:“Error contacting service. It is probably not running.”
  详细解决方案

Zookeeper:“Error contacting service. It is probably not running.”

热度:28   发布时间:2024-01-19 01:06:33.0

Zookeeper配置集群后,启动会报“Error contacting service. It is probably not running.”


[root@test58 bin]# ./zkServer.sh status
JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
原因,上一次启动时port被占用
[root@test58 bin]# netstat -ptnl |grep 2181
tcp 0 0 :::2181 :::* LISTEN 9907/java

解决办法:
[root@test58 bin]# kill -9 9907
[root@test58 bin]# ./zkServer.sh stop
JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Stopping zookeeper ... ./zkServer.sh: line 143: kill: (16797) - No such process
STOPPED
[root@test58 bin]# ./zkServer.sh start
JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@test58 bin]# ./zkServer.sh status
JMX enabled by default
Using config: /opt/zookeeper/bin/../conf/zoo.cfg
Mode: follower
[root@test58 bin]# 

  相关解决方案