大网数据广告活动
服务器运维问答

Aborted connection (Got an error reading communication packets)

· 52CE 我爱测

The mysql error.log shows [Warning] Aborted connection 320935 to db: '...' user: '...' host: '...' (Got an error reading communication packets) While the client side get's: Lost connection to MySQL server at 'reading initial comm…

问题原文

原帖链接 · PiTheNumber · CC BY-SA 3.0

The mysql error.log shows

[Warning] Aborted connection 320935 to db: '...' user: '...' host: '...' (Got an error reading communication packets)

While the client side get's:

Lost connection to MySQL server at 'reading initial communication packet', system error: 111
Lost connection to MySQL server at 'reading authorization packet', system error: 0
and after a while: Host '...' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

I read mysql manual about this, and a lot of other threads. So I changed some values in my.cnf

max_allowed_packet      = 512M
connect_timeout = 60
net_read_timeout = 120
innodb_buffer_pool_size = 5G

Looked at query log of a broken connection:

22400 Connect user@host on dbname
22400 Query SELECT @@sql_mode
22400 Query     SET SESSION sql_mode=''
22400 Query     SET NAMES utf8
22400 Init DB   dbname
22400 Init DB   dbname

Checked table status. bind-address is the server IP but I need to be able to connect from outside.

Aborted_connects is 196

社区高分解答

原帖链接 · Matthew Ife · CC BY-SA 3.0

Based off of the limited data I wonder if you have a firewall between the client and the MySQL server (it may be on the hosts directly) which permits 3306 to the MySQL server but is blocking response packets to the initial SYN request back.

You may want to perform a packet dump on both sides to work out what is happening on the TCP side and/or check any firewalls that exists between both sides.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-06-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。