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

ZooKeeper 集群7

作者头像
franket
发布2022-03-25 11:31:31
2490
发布2022-03-25 11:31:31
举报
文章被收录于专栏:技术杂记

服务状态

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

连接测试

代码语言:javascript
复制
[root@redis-b zookeeper-3.4.6-real]# zookeeper-3.4.6-real/bin/zkCli.sh -server 192.168.100.101:2180
Connecting to 192.168.100.101:2180
2015-12-03 21:17:07,041 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2015-12-03 21:17:07,046 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=220.250.64.225
2015-12-03 21:17:07,046 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.7.0_65
2015-12-03 21:17:07,049 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../build/classes:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../build/lib/*.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../lib/slf4j-log4j12-1.6.1.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../lib/slf4j-api-1.6.1.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../lib/netty-3.7.0.Final.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../lib/log4j-1.2.16.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../lib/jline-0.9.94.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../zookeeper-3.4.6.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../src/java/lib/*.jar:/root/zk/zookeeper-3.4.6-real/zookeeper-3.4.6-real/bin/../conf:
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2015-12-03 21:17:07,050 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2015-12-03 21:17:07,051 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2015-12-03 21:17:07,051 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=2.6.32-504.el6.x86_64
2015-12-03 21:17:07,051 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2015-12-03 21:17:07,051 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2015-12-03 21:17:07,051 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/root/zk/zookeeper-3.4.6-real
2015-12-03 21:17:07,054 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=192.168.100.101:2180 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@3243a52c
Welcome to ZooKeeper!
2015-12-03 21:17:07,222 [myid:] - INFO  [main-SendThread(192.168.100.101:2180):ClientCnxn$SendThread@975] - Opening socket connection to server 192.168.100.101/192.168.100.101:2180. Will not attempt to authenticate using SASL (unknown error)
2015-12-03 21:17:07,232 [myid:] - INFO  [main-SendThread(192.168.100.101:2180):ClientCnxn$SendThread@852] - Socket connection established to 192.168.100.101/192.168.100.101:2180, initiating session
JLine support is enabled
2015-12-03 21:17:07,370 [myid:] - INFO  [main-SendThread(192.168.100.101:2180):ClientCnxn$SendThread@1235] - Session establishment complete on server 192.168.100.101/192.168.100.101:2180, sessionid = 0x655167f10adf0000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zk: 192.168.100.101:2180(CONNECTED) 0] 
[zk: 192.168.100.101:2180(CONNECTED) 0] 
[zk: 192.168.100.101:2180(CONNECTED) 0] ls /
[zookeeper]
[zk: 192.168.100.101:2180(CONNECTED) 1] create /ui ui
Created /ui
[zk: 192.168.100.101:2180(CONNECTED) 3] get /ui
ui
cZxid = 0x100000002
ctime = Thu Dec 03 21:17:30 CST 2015
mZxid = 0x100000002
mtime = Thu Dec 03 21:17:30 CST 2015
pZxid = 0x100000002
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 2
numChildren = 0
[zk: 192.168.100.101:2180(CONNECTED) 4] connect 192.168.100.102:2180
2015-12-03 21:17:51,662 [myid:] - INFO  [main:ZooKeeper@684] - Session: 0x655167f10adf0000 closed
2015-12-03 21:17:51,662 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=192.168.100.102:2180 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@339bf2ac
2015-12-03 21:17:51,662 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down
2015-12-03 21:17:51,668 [myid:] - INFO  [main-SendThread(192.168.100.102:2180):ClientCnxn$SendThread@975] - Opening socket connection to server 192.168.100.102/192.168.100.102:2180. Will not attempt to authenticate using SASL (unknown error)
[zk: 192.168.100.102:2180(CONNECTING) 5] 2015-12-03 21:17:51,693 [myid:] - INFO  [main-SendThread(192.168.100.102:2180):ClientCnxn$SendThread@852] - Socket connection established to 192.168.100.102/192.168.100.102:2180, initiating session
2015-12-03 21:17:51,714 [myid:] - INFO  [main-SendThread(192.168.100.102:2180):ClientCnxn$SendThread@1235] - Session establishment complete on server 192.168.100.102/192.168.100.102:2180, sessionid = 0x665167f1562b0000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null

[zk: 192.168.100.102:2180(CONNECTED) 5] ls /
[ui, zookeeper]
[zk: 192.168.100.102:2180(CONNECTED) 6] get /ui
ui
cZxid = 0x100000002
ctime = Thu Dec 03 21:17:30 CST 2015
mZxid = 0x100000002
mtime = Thu Dec 03 21:17:30 CST 2015
pZxid = 0x100000002
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 2
numChildren = 0
[zk: 192.168.100.102:2180(CONNECTED) 7] connect 192.168.100.202:2180
2015-12-03 21:18:07,300 [myid:] - INFO  [main:ZooKeeper@684] - Session: 0x665167f1562b0000 closed
2015-12-03 21:18:07,300 [myid:] - INFO  [main-EventThread:ClientCnxn$EventThread@512] - EventThread shut down
2015-12-03 21:18:07,300 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=192.168.100.202:2180 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@76fb7505
[zk: 192.168.100.202:2180(CONNECTING) 8] 2015-12-03 21:18:07,327 [myid:] - INFO  [main-SendThread(192.168.100.202:2180):ClientCnxn$SendThread@975] - Opening socket connection to server 192.168.100.202/192.168.100.202:2180. Will not attempt to authenticate using SASL (unknown error)
2015-12-03 21:18:07,328 [myid:] - INFO  [main-SendThread(192.168.100.202:2180):ClientCnxn$SendThread@852] - Socket connection established to 192.168.100.202/192.168.100.202:2180, initiating session
2015-12-03 21:18:07,379 [myid:] - INFO  [main-SendThread(192.168.100.202:2180):ClientCnxn$SendThread@1235] - Session establishment complete on server 192.168.100.202/192.168.100.202:2180, sessionid = 0xca5167f10f260000, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null

[zk: 192.168.100.202:2180(CONNECTED) 8] ls /   
[ui, zookeeper]
[zk: 192.168.100.202:2180(CONNECTED) 9] get /ui
ui
cZxid = 0x100000002
ctime = Thu Dec 03 21:17:30 CST 2015
mZxid = 0x100000002
mtime = Thu Dec 03 21:17:30 CST 2015
pZxid = 0x100000002
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 2
numChildren = 0
[zk: 192.168.100.202:2180(CONNECTED) 10] 

原文地址

本文系转载,前往查看

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

本文系转载前往查看

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

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 连接测试
相关产品与服务
腾讯云服务器利旧
云服务器(Cloud Virtual Machine,CVM)提供安全可靠的弹性计算服务。 您可以实时扩展或缩减计算资源,适应变化的业务需求,并只需按实际使用的资源计费。使用 CVM 可以极大降低您的软硬件采购成本,简化 IT 运维工作。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档