前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ZooKeeper 集群3

ZooKeeper 集群3

作者头像
franket
发布2022-03-25 10:12:35
1690
发布2022-03-25 10:12:35
举报
文章被收录于专栏:技术杂记

依次关掉服务

当前状态

代码语言:javascript
复制
[root@h101 zk]# zookeeper-3.4.6/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: follower
[root@h101 zk]# zookeeper-3.4.6.1/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.1/bin/../conf/zoo.cfg
Mode: leader
[root@h101 zk]# zookeeper-3.4.6.2/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.2/bin/../conf/zoo.cfg
Mode: follower
[root@h101 zk]#

关掉当前leader

代码语言:javascript
复制
[root@h101 zk]# zookeeper-3.4.6.1/bin/zkServer.sh  stop
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.1/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@h101 zk]# zookeeper-3.4.6.2/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.2/bin/../conf/zoo.cfg
Mode: leader
[root@h101 zk]# zookeeper-3.4.6/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6/bin/../conf/zoo.cfg
Mode: follower
[root@h101 zk]#

关掉新选出的leader(关掉一大半server)

代码语言:javascript
复制
[root@h101 zk]# zookeeper-3.4.6.2/bin/zkServer.sh  stop
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.2/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@h101 zk]# zookeeper-3.4.6/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@h101 zk]# zookeeper-3.4.6.1/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.1/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@h101 zk]# zookeeper-3.4.6.2/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6.2/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@h101 zk]# ps faux | grep zookeeper | grep -v grep 
root      6117  0.9  2.4 2103548 46112 pts/0   Sl   20:27   0:01 java -Dzookeeper.log.dir=. -Dzookeeper.root.logger=INFO,CONSOLE -cp /root/zk/zookeeper-3.4.6/bin/../build/classes:/root/zk/zookeeper-3.4.6/bin/../build/lib/*.jar:/root/zk/zookeeper-3.4.6/bin/../lib/slf4j-log4j12-1.6.1.jar:/root/zk/zookeeper-3.4.6/bin/../lib/slf4j-api-1.6.1.jar:/root/zk/zookeeper-3.4.6/bin/../lib/netty-3.7.0.Final.jar:/root/zk/zookeeper-3.4.6/bin/../lib/log4j-1.2.16.jar:/root/zk/zookeeper-3.4.6/bin/../lib/jline-0.9.94.jar:/root/zk/zookeeper-3.4.6/bin/../zookeeper-3.4.6.jar:/root/zk/zookeeper-3.4.6/bin/../src/java/lib/*.jar:/root/zk/zookeeper-3.4.6/bin/../conf: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false org.apache.zookeeper.server.quorum.QuorumPeerMain /root/zk/zookeeper-3.4.6/bin/../conf/zoo.cfg
[root@h101 zk]# zookeeper-3.4.6/bin/zkServer.sh  status
JMX enabled by default
Using config: /root/zk/zookeeper-3.4.6/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
[root@h101 zk]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 依次关掉服务
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档