风过留
2021-09-09 11:03
采纳率: 0%
浏览 37

Zookeeper 的 Client session timed out 问题


[WARN] 20210909_101240_772 [ClientCnxn.java 1242]: Client session timed out, have not heard from server in 5000ms for session id 0x0
[WARN] 20210909_101240_772 [ClientCnxn.java 1285]: Session 0x0 for sever 127.0.0.1/127.0.0.1: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 5000ms for session id 0x0  at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1243)
[INFO] 20210909_101242_68 [ClientC​​nxn.java 1167]: Opening socket connection to server 127.0.0.1/127.0.0.1:2181.
[INFO] 20210909_101242_68 [ClientCnxn.java 1169]: SASL config status: Will not attempt to authenticate using SASL (unknown error)
[INFO] 20210909_101242_69 [ClientCnxn.java 999]: Socket connection established, initiating session, client: /127.0.0.1:21181, server: 127.0.0.1/127.0.0.1:2181 

我这边起了zookeeper服务,同 Tomcat 作为客户端去连接,之前都好好的,今天不知为什么Tomcat突然一直在刷这个异常警警告。此时我这边起zkCli去get节点信息或者Tomcat这里调用existPath都报连不上zookeeper服务。Tomcat重启也无济于事。
最后是重启zookeeper服务才恢复正常。求问各位大牛有没有遇到过类似的问题,是什么原因造成的呢?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • 可能是网络原因或者服务器原因导致超时了

    打赏 评论
  • 有没有报Error的代码
    Warn不一定有关系

    打赏 评论

相关推荐 更多相似问题