场景重现:
场景1:不停止clients,删除datadirs
场景2:不停止clients,删除一些snapshots或者重启quorum
2017-07-17 18:19:19,338 [myid:0] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:28421:NIOServerCnxnFactory@197] - Accepted socket connection from /10.204.96.205:33317
2017-07-17 18:19:19,338 [myid:0] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:28421:ZooKeeperServer@841] - Refusing session request for client /10.204.96.205:33317 as it has seen zxid 0x2001597f6 our last zxid is 0x10017c19c client must try another server
2017-07-17 18:19:19,338 [myid:0] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:28421:NIOServerCnxn@1007] - Closed socket connection for client /10.204.96.205:33317 (no session established for client)
zookeeper相关源代码:
if (connReq.getLastZxidSeen() > zk.getZKDatabase().getDataTreeLastProcessedZxid()) {
String msg = "Refusing session request for client "
+ sock.socket().getRemoteSocketAddress()
+ " as it has seen zxid 0x"
+ Long.toHexString(connReq.getLastZxidSeen())
+ " our last zxid is 0x"
+ Long.toHexString(zk.getZKDatabase().getDataTreeLastProcessedZxid())
+ " client must try another server";
LOG.info(msg);
throw new CloseRequestException(msg);
}
最后欢迎大家访问我的个人网站:1024s