zookeeper 链接异常
# 问题描述
在进行 Spring Boot 集成 zk 的过程中,配置好了 启动后,控制台异常,如下
2022-12-30 18:04:30.279 INFO 12240 --- [42.103.10:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 8.142.103.10/8.142.103.10:2181.
2022-12-30 18:04:30.279 INFO 12240 --- [42.103.10:2181)] org.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
2022-12-30 18:04:40.280 WARN 12240 --- [42.103.10:2181)] org.apache.zookeeper.ClientCnxn : Client session timed out, have not heard from server in 11001ms for session id 0x0
2022-12-30 18:04:40.280 WARN 12240 --- [42.103.10:2181)] org.apache.zookeeper.ClientCnxn : Session 0x0 for sever 8.142.103.10/8.142.103.10:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
org.apache.zookeeper.ClientCnxn$SessionTimeoutException: Client session timed out, have not heard from server in 11001ms for session id 0x0
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1230) ~[zookeeper-3.6.0.jar:3.6.0]
1
2
3
4
5
6
7
2
3
4
5
6
7
此错误一直在循环的输出
# 问题解决
我的 zk 集群是搭建在自己的服务器上的,但是服务器并没有开放对应的端口,只需要开放端口即可
上次更新: 2022/12/30, 19:06:36