Port 8000, PID 4, not able to kill, taskill /f /pid 4, Access Denied

garg10may picture garg10may · Sep 21, 2014 · Viewed 10.3k times · Source

I am not able to kill process bound to 8000 port, due to which I am not able to start HTTP server. This is in reference to question Start HTTP/HTTPS server, python -m SimpleHTTPServer

C:\>taskkill /f /pid 4
ERROR: The process with PID 4 could not be terminated.
Reason: Access is denied.

Even killing by below is not working which I found somewhere.

C:\>taskkill /f /s localhost /pid 4
ERROR: The process with PID 4 could not be terminated.
Reason: Access Denied.

PID 4 is system process, what might be running on there, how do I stop it, why are other ports is a similar fashion listening.

C:\>netstat -ab

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:135            garg10may-PC:0         LISTENING
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:443            garg10may-PC:0         LISTENING
 [vmware-hostd.exe]
  TCP    0.0.0.0:445            garg10may-PC:0         LISTENING
 Can not obtain ownership information
  TCP    0.0.0.0:902            garg10may-PC:0         LISTENING
 [vmware-authd.exe]
  TCP    0.0.0.0:912            garg10may-PC:0         LISTENING
 [vmware-authd.exe]
  TCP    0.0.0.0:8000           garg10may-PC:0         LISTENING
 Can not obtain ownership information

Answer

Gonza Piotti picture Gonza Piotti · Jan 20, 2017

if you're in Windows this might help you, the port 80 is usually being used by this service: "World Wide Web Publishing Service", open "Services" in the Control Panel and stop it