Zookeeper集群查看状态失败 Error contacting service. It is probably not running.

记得以前能用来着 安装Hbase突然不能用了

三个机子都启动后 zkServer.sh start
jps查看可以有QuorumPeerMain服务

但是查探三台机子的zkServer.sh status
出现

Error contacting service. It is probably not running.

找到安装Zookeepe时建立的存储文件夹 zkdata 我当时放到了home目录下
其实好像一般在Zookeeper文件夹里面
所以我在home目录下找到了我的zookeeper.out的日志文件
查看后 Cannot open channel to X at election address Error contacting service. It is probably not running.

然后就搜索百度 啥的
找到了解决方法

https://www.cnblogs.com/wangdaijun/p/5437349.html

就是重新设置zoo.cfg 在conf下

/usr/local/zookeeper-3.4.7/bin/…/conf/zoo.cfg
这个文件

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

例如:

server.1=0.0.0.0:2888:3888
server.2=192.168.10.10:2888:3888
server.3=192.168.2.1:2888:3888

修改是哪个机子的这个文件 每个机子将他们的地址改为本地的 注意只改本机 改为0.0.0.0即可
重新启动
查看status 完美

Zookeeper集群查看状态失败 Error contacting service. It is probably not running._第1张图片Zookeeper集群查看状态失败 Error contacting service. It is probably not running._第2张图片
Zookeeper集群查看状态失败 Error contacting service. It is probably not running._第3张图片
Zookeeper集群查看状态失败 Error contacting service. It is probably not running._第4张图片
在这里插入图片描述

你可能感兴趣的:(大数据,Zookeeper错误)