Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an app that listens on port 7001, which sometimes crashes but leaves the port open. netstat reports a PID that doesn't exist. How is that possible? How can I force the port to close without restarting the machine?

C:\>netstat -a -o

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    JD1:7001               JD1.intranet:0         LISTENING       6060

C:\>taskkill /pid 6060
ERROR: The process "6060" not found.
share|improve this question
Got the same problem. Happens randomly on different machines. Been battling it for 2 years +. No way around it except a reboot. – user63163 Dec 9 '10 at 21:52

Try netstat with the -b option as well as the -a and -o options to show the executables involved. That may help you track down the culprit.

share|improve this answer

Try using Process Explorer to find and kill the process. If you need a command-line program, try pskill instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.