我在同一台机器上运行 3 个节点的 zookeeper 集合。我将动物园管理员打包到三个不同的位置。我可以启动所有 3 个节点。当我查看节点的状态时,一个节点是领导者,另外两个处于跟随者状态。但是,当我尝试停止节点时,没有一个节点停止。
我有三个 Zookeeper 服务器,例如,
/opt/zookeeper/zookeeper1
/opt/zookeeper/zookeeper2
/opt/zookeeper/zookeeper3
我的 zoo.cfg 文件是,
/opt/zookeeper/zookeeper1/conf/zoo.cfg
tickTime=2000
dataDir=/opt/zookeeper/zookeeper1/tmp
clientPort=2184
initLimit=10
syncLimit=5
server.1=localhost:2888:3888
server.2=localhost:2889:3889
server.3=localhost:2890:3890
/opt/zookeeper/zookeeper2/conf/zoo.cfg
tickTime=2000
dataDir=/opt/zookeeper/zookeeper2/tmp
clientPort=2185
initLimit=10
syncLimit=5
server.1=localhost:2888:3888
server.2=localhost:2889:3889
server.3=localhost:2890:3890
/opt/zookeeper/zookeeper3/conf/zoo.cfg
tickTime=2000
dataDir=/opt/zookeeper/zookeeper3/tmp
clientPort=2186
initLimit=10
syncLimit=5
server.1=localhost:2888:3888
server.2=localhost:2889:3889
server.3=localhost:2890:3890
我已经启动了每个节点
/opt/zookeeper/zookeeper1/bin: ./zkServer.sh start
/opt/zookeeper/zookeeper2/bin: ./zkServer.sh start
/opt/zookeeper/zookeeper3/bin: ./zkServer.sh start
我试图通过以下方式停止其中一个节点,
/opt/zookeeper/zookeeper2/bin: ./zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/zookeeper2/bin/../conf/zoo.cfg
Stopping zookeeper ... ./zkServer.sh: line 182: kill: (14255) - No such process
STOPPED
然后我检查节点的状态,
/opt/zookeeper/zookeeper2/bin: ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /opt/zookeeper/zookeeper2/bin/../conf/zoo.cfg
Mode: leader
我正在寻求解释为什么我无法停止节点。任何帮助将不胜感激。