欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Zookeeper无法启动 Error contacting service. It is probably not running.

程序员文章站 2022-04-28 18:30:28
...

当我们启动集群时显示启动中Starting zookeeper … STARTED
Zookeeper无法启动 Error contacting service. It is probably not running.
然而我们查看状态时却 not running
Zookeeper无法启动 Error contacting service. It is probably not running.
首先查看是否安装jdk,输入java -version查看一下java版本
Zookeeper无法启动 Error contacting service. It is probably not running.
发现没有找到,去查看环境变量

vim /etc/profile

发现有环境变量
Zookeeper无法启动 Error contacting service. It is probably not running.
退出文件,生效一下

source /etc/profile

再试一下java -version查看版本号
Zookeeper无法启动 Error contacting service. It is probably not running.
有java版本号了,然后查看zookeeper的端口2181是否已经被占用

netstat -apn | grep 2181

如果被占用,则杀掉进程

kill -9 进程号

再试一下运行Zookeeper

如果没有安装jdk,可以查看我另一篇博客安装https://blog.csdn.net/weixin_43696563/article/details/103074823

Zookeeper无法启动 Error contacting service. It is probably not running.
Zookeeper无法启动 Error contacting service. It is probably not running.
Zookeeper无法启动 Error contacting service. It is probably not running.
大功告成了