UAT环境使用docker镜像部署zookeeper,客户端不能正常连接。
2018-06-27 16:28:37.186 [ip: ] [sessionId: ] [uri: ] INFO main-EventThread org.apache.curator.framework.state.ConnectionStateManager 228 State change: SUSPENDED
2018-06-27 16:28:38.569 [ip: ] [sessionId: ] [uri: ] INFO main-SendThread(192.168.11.218:2181) org.apache.zookeeper.ClientCnxn 1032 Opening socket connection to server 192.168.11.218/192.168.11.218:2181. Will not attempt to authenticate using SASL (unknown error)
2018-06-27 16:28:38.571 [ip: ] [sessionId: ] [uri: ] INFO main-SendThread(192.168.11.218:2181) org.apache.zookeeper.ClientCnxn 876 Socket connection established to 192.168.11.218/192.168.11.218:2181, initiating session
2018-06-27 16:28:38.575 [ip: ] [sessionId: ] [uri: ] WARN main-SendThread(192.168.11.218:2181) org.apache.zookeeper.ClientCnxnSocket 139 Connected to an old server; r-o mode will be unavailable
2018-06-27 16:28:38.575 [ip: ] [sessionId: ] [uri: ] INFO main-SendThread(192.168.11.218:2181) org.apache.zookeeper.ClientCnxn 1299 Session establishment complete on server 192.168.11.218/192.168.11.218:2181, sessionid = 0x164402e4cf40006, negotiated timeout = 40000
2018-06-27 16:28:38.575 [ip: ] [sessionId: ] [uri: ] INFO main-EventThread org.apache.curator.framework.state.ConnectionStateManager 228 State change: RECONNECTED
2018-06-27 16:28:38.580 [ip: ] [sessionId: ] [uri: ] WARN main-SendThread(192.168.11.218:2181) org.apache.zookeeper.ClientCnxn 1162 Session 0x164402e4cf40006 for server 192.168.11.218/192.168.11.218:2181, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Xid out of order. Got Xid 30 with err -101 expected Xid 29 for a packet with details: clientPath:null serverPath:null finished:false header:: 29,14 replyHeader:: 0,0,-4 request:: org.apache.zookeeper.MultiTransactionRecord@35bd2498 response:: org.apache.zookeeper.MultiResponse@0
at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:827)
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:94)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
由截图可知,服务器使用的镜像版本低于zookeepe客户端使用的版本,版本不兼容,导致客户端无法正确连接。
https://hub.docker.com/r/_/zookeeper/
前往hub.docker.com下载zookeepe镜像,原则是尽量和客户端版本匹配,略高于客户端也是可以的
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。