zk启动失败问题解决

[root@slave2 ~]# cd /home/data/appcom/zookeeper-3.4.10/bin/
[root@slave2 bin]# ./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/data/appcom/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[root@slave2 bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /home/data/appcom/zookeeper-3.4.10/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@slave2 bin]# ./zkServer.sh status

zookeeper启动失败如上
1:先查看是否安装java
java -version
2:查看zk端口是否被占用
netstat -apn |grep 2181
如果被占用 kill
3:删除data目录下除了myid的其他文件
以上如果还不能解决问题,那就要看防火墙是否关闭
systemctl status firewalld.service
systemctl stop firewalld.service
重新启动完美解决

 

你可能感兴趣的:(zk,大数据)