1

I am using a software development IDE (Intellij) that is using local machine port 5005 for Java program debugging. In some occasions it reports that it cannot connect because the port is being used or sometimes reports connection timeout. So I restart IDE, kill all java and javaw processes, and then I run:

netstat -a -n | find /c "5005"

It reports 0. To be sure, I also run netstat without find and investigate the list - no 5005 with listening nor with wait state. But still after next launch IDE keeps reporting the same connection errors.

The only way that helps to recover is to reboot the system. After that it works just fine for many hours or even days until it gets stuck again with the same symptoms.

I'm confused about this. I imagined that netstat displays all the ports being used, but obviously it misses something. Only full reboot kills that "unknown invisible process" that has blocked the port.

What is going on here? How can a port on Windows be blocked in such a manner that even netstat doesn't report it?

5
  • 2
    Just an idea: take a look at the Microsoft's Process Explorer! I'm not sure if that is what you want, but... (docs.microsoft.com/en-us/sysinternals/downloads/…)
    – user907961
    Jun 12 '18 at 8:19
  • 1
    Resetting the network stack does nothing? Jun 14 '18 at 21:13
  • @Tim_Stewart thanks, actually that led me to an idea - I tried to Disable and then Enable all the network interfaces and it seemed to fix the issue. I could use it as a better alternative to full reboot. Still weird, what's going on with those ports. Jun 15 '18 at 21:49
  • Are you running it as administrator? It may help. Jun 16 '18 at 1:34
  • Yes, I'm using an administrative account. Currently I narrowed the cause of the problem down to VPN (Check Point Endpoint Security VPN) which I'm sometimes using to connect to our office servers. The problem with "ghost port" starts when VPN is being used and remains even after disconnecting from VPN. The only solution is to reboot or do that Disable / Enable trick to make the port available again. Jun 16 '18 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.