问题描述
各位大虾,我在进行TCP通信时,有时候发现有如下问题:用netstat-nap看到有的established状态没有对应的进程名称,这个时候也有消息阻塞在那里,如下:tcp00:::9001:::*LISTEN28332/javatcp2520::ffff:192.168.1.11:9001::ffff:192.168.1.47:4535ESTABLISHED28332/javatcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.56:2096ESTABLISHED-tcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.63:2089ESTABLISHED-tcp00::ffff:192.168.1.11:9001::ffff:192.168.1.53:3730ESTABLISHED28332/javatcp2520::ffff:192.168.1.11:9001::ffff:192.168.1.64:1812ESTABLISHED28332/javatcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.41:4983ESTABLISHED-tcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.45:1097ESTABLISHED-tcp2240::ffff:192.168.1.11:9001::ffff:192.168.1.31:3254ESTABLISHED-tcp00::ffff:192.168.1.11:9001::ffff:192.168.1.57:1326ESTABLISHED28332/javatcp2520::ffff:192.168.1.11:9001::ffff:192.168.1.61:2598ESTABLISHED28332/javatcp00::ffff:192.168.1.11:9001::ffff:192.168.1.75:4544ESTABLISHED28332/javatcp2520::ffff:192.168.1.11:9001::ffff:192.168.1.43:4033ESTABLISHED28332/javatcp00::ffff:192.168.1.11:9001::ffff:192.168.1.42:4718ESTABLISHED28332/javatcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.58:3187ESTABLISHED-tcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.65:1552ESTABLISHED-tcp2520::ffff:192.168.1.11:9001::ffff:192.168.1.74:2686ESTABLISHED-tcp00::ffff:192.168.1.11:9001::ffff:192.168.1.55:2343ESTABLISHED28332/javatcp00::ffff:192.168.1.11:9001::ffff:192.168.1.73:2474ESTABLISHED28332/javatcp2240::ffff:192.168.1.11:9001::ffff:192.168.1.32:4279ESTABLISHED-tcp1960::ffff:192.168.1.11:9001::ffff:192.168.1.72:4658ESTABLISHED-tcp00::ffff:192.168.1.11:9001
解决方案
解决方案二:
netstat-o可以看到对应的PID,不过要在任务管理器里面显示出进程的PID。
解决方案三:
已经找到原因:在accept线程中,连接连接后的后续处理阻塞,造成后续的连接无法正确被accept()到,所以出现上述情况.
解决方案四:
该回复于2014-09-22 08:47:24被版主删除