I have discovered a running process with PID 26376 listening on port 9001 and 9002 as when I try to run my program(as a service) which binds to that port it fails.
But when I try to kill it using taskkill /PID it says that the process 26376 is not found. Similarly when I try to find the process in task manager with "Show processes from all users" selected, I couldn't find it anywhere.
Can anyone explain this? Is it a defunct zombie process? I suspect that the process listening on that port is a previous instance of my program running but what could have caused this?
EDIT: Sysinternals TCPView shows the process as non-existent. Sysinternals Process Explorer does not show the process. Tasklist does not show the process.
Task Manager can be opened in a number of ways, but the simplest is to select Ctrl+Alt+Delete, and then select Task Manager. In Windows, first click More details to expand the information displayed. From the Processes tab, select Details to see the process ID listed in the PID column.
Short for process identifier, a PID is a unique number that identifies each running processes in an operating system, such as Linux, Unix, macOS, and Microsoft Windows. The output below shows a few of the processes running in Windows and their associated PIDs listed in the PID column.
The Netstat.exe command has a switch, that can display the process identifier (PID) that is associated with each connection to identify port conflicts. This information can be used to determine which process (program) listens on a given port.
How to get PID using Task Manager. Press Ctrl+Shift+Esc on the keyboard. Go to the Processes tab. Right-click the header of the table and select PID in the context menu.
You don't need Task Manager for tracking this. Just run netstat -b
which will display the exe associated with the PID..
Well, in my case killing all the conhost.exe instances owned by the same user as the initial process released the port.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With