首页 > 其他分享 >Error contacting service. It is probably not running.

Error contacting service. It is probably not running.

时间:2023-01-14 21:36:24浏览次数:36  
标签:wang service zookeeper xx running usr 3.4 probably local


搭建zookeeper集群是发现了一个奇怪的现象:
问题:在同一台机器上,启动三个zookeeper,三个分别使用不同的配置文件,内容如下:

tickTime=2000
initLimit=10
syncLimit=5
dataDir=/usr/local/wang/zookeeper-3.4.8-3/data
dataLogDir=/usr/local/wang/zookeeper-3.4.8-3/log
clientPort=2183

server.1=xx.xx.xx.xx:2181:3381
server.2=xx.xx.xx.xx:2182:3382
server.3=xx.xx.xx.xx:2183:3383

对应的dataDir目录下的myid文件也都配置的没有问题,但是在启动时,显示:

root@iZuf6axmuekh1n14dwcufmZ:/usr/local/wang/zookeeper-3.4.8-2/bin# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/wang/zookeeper-3.4.8-2/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

查询状态时却报错:

root@iZuf6axmuekh1n14dwcufmZ:/usr/local/wang/zookeeper-3.4.8-2/bin# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/wang/zookeeper-3.4.8-2/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.

只能启动1,但是状态是standalone

root@iZuf6axmuekh1n14dwcufmZ:/usr/local/wang/zookeeper-3.4.8-1/bin# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/wang/zookeeper-3.4.8-1/bin/../conf/zoo.cfg
Mode: standalone

另外两台启动时就报上面的错误。
网上的处理方式基本就是:
myid配了没有?
三个配置文件有没有问题?

这两个简单的地方核查了都没有问题,实在是找不到原因了,求解答。


标签:wang,service,zookeeper,xx,running,usr,3.4,probably,local
From: https://blog.51cto.com/u_15936016/6007798

相关文章