进程0正在使用我的端口 [英] process 0 is using my port

查看:496
本文介绍了进程0正在使用我的端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个服务器程序,该程序在端口2811上侦听,并且有一些客户端在该端口上进行通信. 当我从命令行运行netstat以查看哪个进程正在使用端口2811时,我发现进程0也正在使用该端口:

I am running a server program that listens on port 2811, and a few clients that communicate on that port. When I run netstat from the command line to see which process is using port 2811, I get that process 0 is also using it:

C:>netstat -ano | find ":2811"
TCP    0.0.0.0:2811           0.0.0.0:0              LISTENING       5448
TCP    127.0.0.1:62391        127.0.0.1:2811         TIME_WAIT       0
TCP    127.0.0.1:62392        127.0.0.1:2811         TIME_WAIT       0

... about 20 more similar lines with pid=0. Then:

TCP    192.168.50.64:2811     192.168.50.64:62237    ESTABLISHED     5448
TCP    192.168.50.64:2811     192.168.50.64:62262    ESTABLISHED     5448
TCP    192.168.50.64:2811     192.168.50.64:62434    ESTABLISHED     5448
TCP    192.168.50.64:62237    192.168.50.64:2811     ESTABLISHED     9472
TCP    192.168.50.64:62262    192.168.50.64:2811     ESTABLISHED     7640
TCP    192.168.50.64:62434    192.168.50.64:2811     ESTABLISHED     5076

如果我理解正确,进程0是空闲进程,它什么也不做. 那为什么要使用我的端口呢?

If I understand correctly, process 0 is the idle process and it does nothing. So why should it be using my port?

推荐答案

因为该端口处于TIME-WAIT状态,这意味着该端口已被两个对等端关闭,并且仅根据RFC 793超时.因此,没有实际的过程归因于它,因此其PID显示为零. AFAIK Windows中的空闲进程为1,而不是0.

Because the port is in TIME-WAIT state, which means it has been closed by both peers and is just timing out per RFC 793. So no actual process is attributable to it, so its PID shows as zero. AFAIK the idle process in Windows is 1, not 0.

这篇关于进程0正在使用我的端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆