Agus Mulyadi
Agus Mulyadi

Reputation: 11

why is system32 ntoskrnl.exe blocking port 80?

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

Answers (4)

Raidenlee
Raidenlee

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:

  1. In windows, open CMD in Administrator Mode and run the below command

netstat -aon | findstr :80

  1. You will see something similar to the below: enter image description here

  2. Go to Task Manager and look for those PIDs 16772, 19224 (it will be different on your machine).

  3. 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:

enter image description here

  1. Retry your application.

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

Jalal Ebrhaimi
Jalal Ebrhaimi

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

Mạnh Hùng Chu
Mạnh Hùng Chu

Reputation: 61

ntoskrnl.exe use by various services, to stop http services try net stop http that will stop some http services, such as:

  • Windows Remote Management (WS-Management)
  • SSDP Discovery
  • Print Spooler
  • IIS Admin Service you can stop these one by one to find which services us

Upvotes: 1

Anders
Anders

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

Related Questions