在 Ubuntu(或 Linux 系统)里看到 “dropped”(丢弃),通常不是单一问题,而是某一类资源/数据包/连接被系统主动或被动丢弃了。下面按常见场景给你梳理原因和排查方法。
查看方式:
ip -s link
或
ifconfig
常见原因:
排查:
ethtool -S eth0 | grep drop
ethtool -g eth0
被 DROP 规则拦掉:
iptables -L -v -n
nft list ruleset
原因:
ss -s
netstat -s | grep -i drop
可能原因:
tcp_tw_recycle(已废弃)rp_filter 反向路径校验dmesg | grep -i "file descriptor"
原因:
ulimit -n 太小dmesg | grep -i "out of memory"
或
cat /proc/net/softnet_stat
例如:
worker_connections 不够日志中常出现:
connection dropped
client disconnected
packet dropped
如果你说的是:
Ubuntu dropped to shell / dropped connection
可能是指:
请补充以下信息之一:
ip -s link 或 dmesg)我可以一步一步帮你查到根因。