首页  

zookeeper JMX数据解析     所属分类 zookeeper 浏览量 1159
集群3个几点
节点1配置

clientPort=6001
server.1=127.0.0.1:6002:6003
server.2=127.0.0.1:6012:6013
server.3=127.0.0.1:6022:6023

server.id=IP/Host:port1:port2
port1 Leader和Follower或Observer交换数据使用 ,leader才开启此端口
port2 用于Leader选举

org.apache.ZooKeeperService:name0=ReplicatedServer_id1
{QuorumSize=3}
集群共3个节点

org.apache.ZooKeeperService:name0=ReplicatedServer_id1,name1=replica.1	

{ElectionType=3, InitLimit=10, MaxClientCnxnsPerHost=60, MaxSessionTimeout=40000, MinSessionTimeout=4000, QuorumAddress=/127.0.0.1:6002, StartTime=Tue Sep 08 11:22:29 CST 2020, State=following, SyncLimit=5, Tick=0, TickTime=2000}
State=following 
following 状态  follow节点

org.apache.ZooKeeperService:name0=ReplicatedServer_id1,name1=replica.1,name2=Follower	
name2=Follower  说明 是 Follower 节点
{AvgRequestLatency=0, ClientPort=10.57.31.22:6001, ElectionTimeTaken=16103, LastQueuedZxid=0x1000001d2, MaxClientCnxnsPerHost=60, MaxRequestLatency=4, MaxSessionTimeout=40000, MinRequestLatency=0, MinSessionTimeout=4000, NumAliveConnections=4, OutstandingRequests=0, PacketsReceived=21359, PacketsSent=21366, PendingRevalidationCount=0, QuorumAddress=Socket[addr=localhost/127.0.0.1,port=6012,localport=8688], StartTime=Tue Sep 08 11:22:45 CST 2020, TickTime=2000, Version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT}
这里有很多重要的数据

ClientPort=10.57.31.22:6001  客户端接口
ElectionTimeTaken=16103
NumAliveConnections=4
PacketsReceived=21359, PacketsSent=21366

QuorumAddress=Socket[addr=localhost/127.0.0.1,port=6012,localport=8688]
leader  连接地址和端口



连接信息 org.apache.ZooKeeperService:name0=ReplicatedServer_id1,name1=replica.1,name2=Follower,name3=Connections,name4=10.57.31.22,name5=0x1746bbcbd7c0007 {AvgLatency=0, EphemeralNodes=[Ljava.lang.String;@ea633ee, LastCxid=0x2e, LastLatency=1, LastOperation=PING, LastResponseTime=Tue Sep 08 18:26:39 CST 2020, LastZxid=0xffffffffffffffff, MaxLatency=2, MinLatency=0, OutstandingRequests=0, PacketsReceived=1007, PacketsSent=1011, SessionId=0x1746bbcbd7c0007, SessionTimeout=40000, SourceIP=10.57.31.22:63376, StartedTime=Tue Sep 08 14:52:42 CST 2020}
其他节点的信息 org.apache.ZooKeeperService:name0=ReplicatedServer_id1,name1=replica.2 {QuorumAddress=localhost:6012} org.apache.ZooKeeperService:name0=ReplicatedServer_id1,name1=replica.3 {QuorumAddress=localhost:6022}
leader 节点信息 节点2为leader 节点 org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.2 {ElectionType=3, InitLimit=10, MaxClientCnxnsPerHost=60, MaxSessionTimeout=40000, MinSessionTimeout=4000, QuorumAddress=/127.0.0.1:6012, StartTime=Tue Sep 08 11:22:45 CST 2020, State=leading, SyncLimit=5, Tick=12903, TickTime=2000} State=leading org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.2,name2=Leader {AvgRequestLatency=0, ClientPort=10.57.31.22:6011, CurrentZxid=0x1000001d2, ElectionTimeTaken=220, MaxClientCnxnsPerHost=60, MaxRequestLatency=9, MaxSessionTimeout=40000, MinRequestLatency=0, MinSessionTimeout=4000, NumAliveConnections=2, OutstandingRequests=0, PacketsReceived=26206, PacketsSent=26216, StartTime=Tue Sep 08 11:22:45 CST 2020, TickTime=2000, Version=3.4.10-39d3a4f269333c922ed3db283be479f9deacaa0f, built on 03/23/2017 10:13 GMT} name2=Leader org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.1 {QuorumAddress=localhost:6002} org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.3 {QuorumAddress=localhost:6022}
节点数 和 监听数 org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.2,name2=Leader,name3=InMemoryDataTree {LastZxid=0x1000001d2, NodeCount=255, WatchCount=22}

上一篇     下一篇
因配置错误导致kafka无法启动的案例

菜根谭精彩摘录

dubbo服务调用流程

dubbo调用失败问题排查

dubbo telnet 命令使用

时间管理大师的5大技巧