Closed socket connection for client /39.103.162.230:56100 (no session established for client)
个人简介
我是廖志伟,一名Java开发工程师,CSDN博客专家,Java领域优质创作者,《幕后大佬》社区创始人,《南北踏尘》微信公众号创始人。多年一线研发经验,曾就职多家互联网公司,参与并主导多个百万级并发的互联网产品研发与系统架构搭建,对大型分布式,高并发及微服务架构,缓存框架有非常深入的研究,对于中间件底层,架构搭建,系统调优颇多经验。
正文
本文的大概内容:
一、业务场景
之前配置好的zookeeper突然就连接不上了,在这之前我重置了服务器密码,服务器重启过一次,然后就发现连接不上了。参考之前的解决方案,成功解决问题。
跟我之前碰到过的一个docker配置对外端口的业务场景有点相像(事情是这样的,我们公司有三台服务器给我来运维,我在这三台服务器上面都配置过docker对外暴露的端口,但是后面运行了二三周的样子,服务器一台先后都出现了通过密钥文件无法登陆的情况,这三台服务器都是在腾讯云的,当时为了项目进度,就在腾讯云控制台重置了密码,咨询了腾讯云的客服人员,也没有给出明确的解决方案,对于docker对外暴露端口,给出了查看端口防火墙的意见,对于服务器为什么运行一段时间突然登陆不上,需要重置密码的情况未做出解答。后面我通过重新开放防火墙端口,解决了之前可以连接上docker对外暴露端口,后面重置密码却又不行的场景。)
二、错误日志
2021-11-15 13:29:22,928 [myid:] - INFO [Thread-8:NIOServerCnxn@1056] - Closed socket connection for client /80.82.77.33:42770 (no session established for client)
2021-11-15 14:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 14:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 15:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 15:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 16:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 16:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 16:17:22,337 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /106.14.47.169:40846
2021-11-15 16:17:22,337 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369295618
2021-11-15 16:17:22,337 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /106.14.47.169:40846 (no session established for client)
2021-11-15 16:17:22,342 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /106.14.47.169:40850
2021-11-15 16:17:22,342 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856
2021-11-15 16:17:22,342 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /106.14.47.169:40850 (no session established for client)
2021-11-15 16:17:22,349 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /106.14.47.169:40852
2021-11-15 16:17:22,349 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369295618
2021-11-15 16:17:22,349 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /106.14.47.169:40852 (no session established for client)
2021-11-15 16:17:22,353 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /106.14.47.169:40856
2021-11-15 16:17:22,354 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856
2021-11-15 16:17:22,354 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /106.14.47.169:40856 (no session established for client)
2021-11-15 17:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 17:02:26,044 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 18:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 18:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 19:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 19:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 20:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 20:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 21:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 21:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 22:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 22:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-15 23:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-15 23:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 00:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 00:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 01:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 01:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 01:22:43,512 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /223.71.167.164:34777
2021-11-16 01:22:43,512 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@908] - Processing envi command from /223.71.167.164:34777
2021-11-16 01:22:43,514 [myid:] - INFO [Thread-9:NIOServerCnxn@1056] - Closed socket connection for client /223.71.167.164:34777 (no session established for client)
2021-11-16 01:22:43,573 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /223.71.167.164:34847
2021-11-16 01:22:43,573 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 1195725856
2021-11-16 01:22:43,573 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /223.71.167.164:34847 (no session established for client)
2021-11-16 01:22:43,675 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /223.71.167.164:47972
2021-11-16 01:22:43,675 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369295618
2021-11-16 01:22:43,676 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /223.71.167.164:47972 (no session established for client)
2021-11-16 02:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 02:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 03:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 03:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 03:14:56,209 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /119.23.138.247:49358
2021-11-16 03:14:56,260 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@908] - Processing stat command from /119.23.138.247:49358
2021-11-16 03:14:56,261 [myid:] - INFO [Thread-10:NIOServerCnxn$StatCommand@687] - Stat command output
2021-11-16 03:14:56,261 [myid:] - INFO [Thread-10:NIOServerCnxn@1056] - Closed socket connection for client /119.23.138.247:49358 (no session established for client)
2021-11-16 04:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 04:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 05:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 05:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 06:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 06:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 07:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 07:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 08:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 08:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 08:14:00,144 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /183.136.225.42:20194
2021-11-16 08:14:00,145 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369295618
2021-11-16 08:14:00,145 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /183.136.225.42:20194 (no session established for client)
2021-11-16 09:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 09:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 10:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 10:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 10:03:55,688 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /39.103.162.230:53828
2021-11-16 10:04:07,858 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@908] - Processing stat command from /39.103.162.230:53828
2021-11-16 10:04:07,858 [myid:] - INFO [Thread-11:NIOServerCnxn$StatCommand@687] - Stat command output
2021-11-16 10:04:07,859 [myid:] - INFO [Thread-11:NIOServerCnxn@1056] - Closed socket connection for client /39.103.162.230:53828 (no session established for client)
2021-11-16 10:08:21,989 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /39.103.162.230:54176
2021-11-16 10:08:32,083 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@376] - Unable to read additional data from client sessionid 0x0, likely client has closed socket
2021-11-16 10:08:32,083 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /39.103.162.230:54176 (no session established for client)
2021-11-16 10:08:32,106 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /39.103.162.230:56100
2021-11-16 10:08:32,107 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369295618
2021-11-16 10:08:32,107 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /39.103.162.230:56100 (no session established for client)
2021-11-16 11:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 11:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 11:24:53,871 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /101.132.111.91:54778
2021-11-16 11:24:53,872 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@383] - Exception causing close of session 0x0: Len error 369296128
2021-11-16 11:24:53,872 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /101.132.111.91:54778 (no session established for client)
2021-11-16 12:02:26,042 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@138] - Purge task started.
2021-11-16 12:02:26,043 [myid:] - INFO [PurgeTask:DatadirCleanupManager$PurgeTask@144] - Purge task completed.
2021-11-16 12:42:40,564 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@215] - Accepted socket connection from /114.87.70.147:15797
2021-11-16 12:42:40,596 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@949] - Client attempting to establish new session at /114.87.70.147:15797
2021-11-16 12:42:40,599 [myid:] - INFO [SyncThread:0:ZooKeeperServer@694] - Established session 0x100016398e70002 with negotiated timeout 5000 for client /114.87.70.147:15797
2021-11-16 12:42:41,164 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@487] - Processed session termination for sessionid: 0x100016398e70002
2021-11-16 12:42:41,165 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1056] - Closed socket connection for client /114.87.70.147:15797 which had sessionid 0x100016398e70002
通过查看日志发现好像也端口连接不上,我看了看端口的情况,发现连接是tc6不上tcp,虽然很奇怪,但是也没深入了解。
三、解决方案
通过重新开放端口,就重新连接上了
firewall-cmd --add-port=2181/tcp --permanent
firewall-cmd --reload
firewall-cmd --query-port=2181/tcp
systemctl restart docker
总结
以上就是本篇博文要讲的内容,还希望各位读者大大能够在评论区积极参与讨论,给文章提出一些宝贵的意见或者建议,合理的内容,我会采纳更新博文,重新分享给大家。
一键三连
感谢大家的支持,用心写博文分享给大家,你的支持(点赞、收藏、关注)是对我创作的最大帮助。
微信公众号:南北踏尘
主页地址:https://blog.csdn.net/java_wxid
社区地址:https://bbs.csdn.net/forums/liaozhiwei
给读者大大的话
我本身是一个很普通的程序员,放在人堆里,除了与生俱来的盛世美颜、所剩不多的发量,就剩下180的大高个了。就是我这样的一个人,默默坚持写博文也有好多年了,有句老话说的好,牛逼之前都是傻逼式的坚持。希望自己可以通过大量的作品,时间的积累,个人魅力、运气和时机,可以打造属于自己的技术影响力。
提示:以下都是资源分享,求个一键三连。
博客封面
首先我要说声抱歉,作为一个学习的平台,博客封面太诱人,这样做是不好滴,但是为了让你点进来这篇博客,看到了我用心编写的博文内容,就博文质量而已,没有任何灌水的情况,也未出现与技术不相干的内容,咱们看博客,不就是看博文内容嘛,所以个人觉得还是值得的。有不少同学惦记着我博客的封面,这里也分享出来给大家,我就求个一键三连,拜托了,这对我真的很重要。
链接:https://pan.baidu.com/s/1Res9qVUKRCAqgqwTIfdM2g
提取码:2021
面试资料
福利大放送,我就求个一键三连,拜托了,这对我真的很重要。
链接:https://pan.baidu.com/s/1FycGBqVQ1xbgSpU1MBAYNQ
提取码:2021
200套PPT模板
福利大放送,我就求个一键三连,拜托了,这对我真的很重要。
链接:https://pan.baidu.com/s/16o6dtRebtBJYfb68BYaIbw
提取码:2021
提问的智慧
福利大放送,我就求个一键三连,拜托了,这对我真的很重要。
链接:https://pan.baidu.com/s/1OWTWYNpajosALT3yIH-eMQ
提取码:2021