unauthenticated user reading from net

本文探讨了一次数据库异常事件的排查过程,重点在于解决大量unauthenticateduser状态的问题。通过检查skip_name_resolve参数确认DNS解析已关闭,并最终定位到网络延迟导致的ping延时过长。网络恢复正常后,异常状态消失。

今天有台数据库异常,登录服务器后执行show processlist,发现大量的 unauthenticated user 状态。如下:

于是第一时间想到DNS反向解析的问题,于是看看是否关闭DNS解析:

mysql> show variables like '%skip_name_resolve%';    
+-------------------+-------+
| Variable_name     | Value |
+-------------------+-------+
| skip_name_resolve | ON    | 
+-------------------+-------+
1 row in set (0.00 sec)

mysql> 

可以看见已经打开禁止DNS解析的参数。在google很久后无解,最后发现是网络问题,由于web到数据库服务器丢包,延时非常严重导致。当时ping的延时已经达到20 ms,非常慢了。如下图。

网络恢复正常以后,延时在10 ms,最后大量的unauthenticated user状态消失。

root@f19a667a1884:/# apt-get update Ign:1 http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease Ign:2 http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease Ign:3 http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InRelease Err:4 http://mirrors.tuna.tsinghua.edu.cn/debian buster Release 404 Not Found [IP: 101.6.15.130 80] Err:5 http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates Release 404 Not Found [IP: 101.6.15.130 80] Err:6 http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates Release 404 Not Found [IP: 101.6.15.130 80] Reading package lists... Done E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
最新发布
11-04
Reading package lists... Done W: https://repo.download.nvidia.com/jetson/common/dists/r34.1/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: https://repo.download.nvidia.com/jetson/t234/dists/r34.1/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: GPG error: http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ports.ubuntu.com/ubuntu-ports jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://ports.ubuntu.com/ubuntu-ports jammy InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
06-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值