Reputation: 11
Today I've tried to start the Visual Studio Developer IIS as usual on Port 80, but this time it has quit with an error that port 80 is already in use. With netstat I've found out, that an application C:/Windows/System32/ntoskrnl.exe is using port 80. My OS is Windows 10
Upvotes: 0
Views: 5931
Reputation: 54
Killing IIS is one solution however there are developers who use other applications on the same machine that also use port 80. It is a painful process to manually find them so after much research this is what helped me resolve my problem:
netstat -aon | findstr :80
Go to Task Manager and look for those PIDs 16772, 19224 (it will be different on your machine).
Right click on the process and end it. You may need to go a step further and find those specific processes in Service Manager and set the startup as Manual. After killing the processes, run the command in step 1 again, you should not see any more processes running:
Disclaimer: ensure you verify what the process is before ending it. In my case it was a video editing program and a GPU overclocking program that was using the ports. Tested on Win 11.
Upvotes: -1
Reputation: 1
I have the same problem with PID 4 blocking port 80.
ntoskrnl.exe was blocked port 80 because SQL Server was installed on my PC. You can uninstall SQL server or stop it's services. then restart.
To find which program using port 80 you can use this code on CMD netsh http show urlacl
and netsh http show servicestate
Source: Port 80 is being used by SYSTEM (PID 4), what is that?
That worked for me. Apache installed and worked with port 80, without any touch.
I hope that helped.
Upvotes: 0
Reputation: 61
ntoskrnl.exe use by various services, to stop http services try net stop http
that will stop some http services, such as:
Upvotes: 1
Reputation: 101656
ntoskrnl.exe is the Windows kernel. If a process dies/crashes without closing a socket correctly the kernel part of the socket will still be alive for a little while but the problem should go away after a couple of minutes.
If the problem does not go away then it is likely that a child process still has a open handle, preventing the dead process from releasing the port.
Upvotes: 0