针对问题:TCP连接失败
分析:netstat -s输出中和连接失败相关的参数
202270382 invalid SYN cookies received --- 三次握手ack包,syncookies校验没通过;
13700572 resets received for embryonic SYN_RECV sockets ---syn_recv状态下,收到非重传的syn包,则返回reset
1123035 passive connections rejected because of time stamp ---开启sysctl_tw_recycle,syn包相应连接的时间戳 小于 路由中保存的时间戳;
14886782 failed connection attempts --- syn_recv状态下,socket被关闭; 或者 收到syn包(非重传)
438798 times the listen queue of a socket overflowed ---收到三次握手ack包,accept队列满
438798 SYNs to LISTEN sockets ignored ---收到三次握手ack包,因各种原因(包括accept队列满) 创建socket失败