zookeeper启动报错Client port found: 2181. Client address: localhost

使用命令bin/zkServer.sh start启动服务,日志无异常。

ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

但是使用 jps 命令查看没有看到 QuorumPeerMain 进程。

4725 NodeManager
5210 Jps
4395 DataNode
4588 ResourceManager

使用命令bin/zkServer.sh status查看状态时出现如果错误:

ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Error contacting service. It is probably not running.

经过反复核查,发现 /opt/module/zookeeper-3.5.7/zkData/myid 文件中配置值均为 2,集群中的不同服务器,myid 配置值不能相同,将三台服务器 myid 分别调整为 2、3、4 后再次启动,zookeeper 可以正常启动。

[omc@hadoop102 bin]$ zk.sh start
---------- zookeeper hadoop102 启动 ------------
ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg
Starting zookeeper ... already running as process 9144.
---------- zookeeper hadoop103 启动 ------------
ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg
Starting zookeeper ... already running as process 5878.
---------- zookeeper hadoop104 启动 ------------
ZooKeeper JMX enabled by default
Using config: /opt/module/zookeeper-3.5.7/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[omc@hadoop102 bin]$
[omc@hadoop102 bin]$
[omc@hadoop102 bin]$
[omc@hadoop102 bin]$ jpsall
=============== hadoop102 ===============
7938 NodeManager
8114 JobHistoryServer
7477 NameNode
9144 QuorumPeerMain
7643 DataNode
9484 Jps
=============== hadoop103 ===============
4725 NodeManager
5878 QuorumPeerMain
6170 Jps
4395 DataNode
4588 ResourceManager
=============== hadoop104 ===============
6019 Jps
4566 SecondaryNameNode
4663 NodeManager
4445 DataNode
5965 QuorumPeerMain

问题解决~~

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