bash
zkServer.sh status
下面是反馈的结果
bash
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Error contacting service. It is probably not running.
问题原因:zookeeper集群需要节点全部启动再查看状态可以
启动所有节点后,再看状态
bash
ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: follower