Zookeeper:Unable to read additional data from client sessionid 0x00, likely client has closed socket
异常信息:
1 2 3 4 5 6 7 8 9 10 | 2018 - 03 - 20 23 : 34 : 01 , 887 [myid: 99 ] - INFO [NIOServerCxn.Factory: 0.0 . 0.0 / 0.0 . 0.0 : 2181 :NIOServerCnxnFactory @197 ] - Accepted socket connection from / 10.121 . 82.229 : 33749 2018 - 03 - 20 23 : 34 : 01 , 887 [myid: 99 ] - WARN [NIOServerCxn.Factory: 0.0 . 0.0 / 0.0 . 0.0 : 2181 :ZooKeeperServer @793 ] - Connection request from old client / 10.121 . 82.229 : 33749 ; will be dropped if server is in r-o mode 2018 - 03 - 20 23 : 34 : 01 , 887 [myid: 99 ] - INFO [NIOServerCxn.Factory: 0.0 . 0.0 / 0.0 . 0.0 : 2181 :ZooKeeperServer @839 ] - Client attempting to establish new session at / 10.121 . 82.229 : 33749 2018 - 03 - 20 23 : 34 : 01 , 890 [myid: 99 ] - INFO [CommitProcessor: 99 :ZooKeeperServer @595 ] - Established session 0x6362257b44e5068d with negotiated timeout 10000 for client / 10.121 . 82.229 : 33749 2018 - 03 - 20 23 : 34 : 21 , 859 [myid: 99 ] - WARN [NIOServerCxn.Factory: 0.0 . 0.0 / 0.0 . 0.0 : 2181 :NIOServerCnxn @349 ] - caught end of stream exception EndOfStreamException: Unable to read additional data from client sessionid 0x6362257b44e5068d , likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java: 220 ) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java: 208 ) at java.lang.Thread.run(Thread.java: 745 ) 2018 - 03 - 20 23 : 34 : 21 , 860 [myid: 99 ] - INFO [NIOServerCxn.Factory: 0.0 . 0.0 / 0.0 . 0.0 : 2181 :NIOServerCnxn @1001 ] - Closed socket connection for client / 10.121 . 82.229 : 33749 which had sessionid 0x6362257b44e5068d |
核心报错信息:
1 | EndOfStreamException: Unable to read additional data from client sessionid 0x6362257b44e5068d , likely client has closed socket |
具体问题所在:
客户端连接Zookeeper时,配置的超时时长过短。致使Zookeeper还没有读完Consumer的数据,连接就被Consumer断开了。
解决方案:
初始化Zookeeper连接时,将接收超时参数值调整大一些即可(tickTime2000改为10000),默认是毫秒(ms)
分类:
Mesos&Kubernetes
, 运维
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
2018-12-20 Golang--不定参数类型
2018-12-20 Golang--选择、循环语法总结
2018-12-20 (转)Docker容器的重启策略及docker run的--restart选项详解
2018-12-20 (转)Golang--使用iota(常量计数器)
2017-12-20 Ubuntu16.04安裝最新Nvidia驱动