Port 80 is being used by SYSTEM (PID 4), what is that?

IisPortPidNetstat

Iis Problem Overview


I am trying to use port 80 for my application server, but when I perform netstat -aon I get:

> TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4

When I look up the process in task manager, it shows PID 4 is SYSTEM, that's it. No extension... nothing. Just "SYSTEM". What's going on here?

I'm afraid to end this process, what do I do?

Iis Solutions


Solution 1 - Iis

There are many services, which can listen port 80 on windows.

Luckily you can detect and stop them all running simple console command:

NET stop HTTP

When you'll start it, you will get list first: enter image description here

To avoid this problem in future go to Local Services and disable listed services.

N.B. - Some services will restart themselves immediately, just run 'NET stop HTTP' few times.

Solution 2 - Iis

A new service called "Web Deployment Agent Service" (MsDepSvc) can also trigger "System" with PID=4 to listen on port 80.

Solution 3 - Iis

Also, try stopping "SQL Server Reporting Services (MSSQLSERVER)", that apparently defaults to 80. I did that and port 80 freed up. PID identified the culprit as "System", but apparently that System can mean multiple things.

Solution 4 - Iis

I had the same problem. Could fix it by stopping the World Wide Web Publishing Service under running services.

Solution 5 - Iis

the IP adress is 0.0.0.0, state = LISTENING: means that port 80 is listening to all interfaces (not used)

How to read NETSTAT -AN results:

Solution 6 - Iis

This works for me:

  1. Right click on My Computer.
  2. Select Manage.
  3. Double click Services and Applications.
  4. Then double click Services.
  5. Right click on "World Wide Web Publishing Service".
  6. Select Stop.

Solution 7 - Iis

It sounds like IIS is listening to port 80 for HTTP requests.

Try stopping IIS by going into Control Panel/Administrative Tools/Internet Information Services, right-clicking on Default Web Site, and click on the Stop option in the popup menu, and see if the listener on port 80 has cleared.

Solution 8 - Iis

WORKING SOLUTION TESTED:(WINDOWS 10)

There are many reasona for this, the one cause/solution i recommended is this:

OPEN YOUR WINDOW COMMAND WITH ADMINISTRATOR PREVILEGE THEN:

net stop http /y

the above will agree to stop http service then:

sc config http start= disabled

the above will configure service to disable by default

IF ABOVE SOLUTION DOES NOT WORK FIND YOUR SPECIFIC CASE HERE:

SOURCE: http://www.devside.net/wamp-server/opening-up-port-80-for-apache-to-use-on-windows

RESTART YOUR WEB SERVER/XAMPP/APACHE AND DONE.


If you ever need to re-enable to default here is the command sc config HTTP start= demand the source of explanation is here http://servicedefaults.com/10/http/

Solution 9 - Iis

I've found out that "SQL Server Reporting Services (MSSQLSERVER)" starts automatically and listens on port 80.

I hope this helps.

O

Solution 10 - Iis

This can be very easily fixed by following these five steps:

  1. Open Services
  2. Right click on World Wide Web Publishing Service
  3. Click STOP

To prevent this issue in future :

  1. Go to Properties
  2. Change Startup type to Manual

Viola u are good to go !

For more info on root cause: https://serverfault.com/questions/65717/port-80-is-being-used-by-system-pid-4-what-is-that

Solution 11 - Iis

An other service that could occupied the port 80 is BranchCache

services.msc showing it as "BranchCache"

or use the net command to stop the service like

net stop PeerDistSvc

Update:

PeerDistSvc is a service behind svhost.exe, to view svchost services type

tasklist /svc /fi "imagename eq svchost.exe"

Solution 12 - Iis

The issue is how to free it up, simply use

net stop http

https://stackoverflow.com/a/16243333/777982

Solution 13 - Iis

I knew these answers were right , but my services.msc was not showing the services, however this did the trick:

sc stop "MsDepSvc" 
sc config "MsDepSvc" start= disabled 

Solution 14 - Iis

I just got this problem today, since it showed up after Norton requested reboot I blamed Norton.
But it wasn't Norton, I removed Norton, rebooted -> problem still there.

netstat -nao was showing that PID 4 owned my port 80 connection.

I then went to control panel, then "Turn Windows features on or off" then unchecked Internet Information Services.
Rebooted, the problem went away.
My xampp server is running ok now.

I don't ever remembering turning IIS on in the first place. I had been running many months before this happened. I still don't know what caused it in the first place. Maybe a previous windows updated enabled iis and my reboot turned it on, I don't know.

Solution 15 - Iis

This Process works for me:

  1. Right click on My Computer.
  2. Select Manage.
  3. Double click Services and Applications.
  4. Then double-click Services.
  5. Right click on "World Wide Web Publishing Service".
  6. Select Stop
  7. Restart XAMPP

Solution 16 - Iis

netsh http show urlacl

The command is mentioned in a previous comment but I'd like to bring it up as an answer. It will get you all reserved URLs in the system. If you look through all records with "80" in URL, you shall have your answer.

For example, in my case, I got:

Reserved URL: http://+:80/Temporary_Listen_Addresses/
        User: \Everyone
            Listen: Yes
            Delegate: No
            SDDL: D:(A;;GX;;;WD)

Reserved URL: http://+:80/0131501b-d67f-491b-9a40-c4bf27bcb4d4/
        User: NT AUTHORITY\NETWORK SERVICE
            Listen: Yes
            Delegate: No
            SDDL: D:(A;;GX;;;NS)

After a quick Google search, I learnt that "NT AUTHORITY\NETWORK SERVICE" belongs to SQL Server. So I went to Services and stopped SQL Server Reporting Service, port 80 is free again as I check netstat -a -b

Solution 17 - Iis

On the lastest version of windows this service is called as "World Wide Web Publishing Service" (W3SVC)

C:\Windows\system32\svchost.exe -k iissvcs

You can stop this service by going to Services (services.msc) and stopping the service and then setting the "Startup type" -> Disabled for preventing it from running on windows startup.

Solution 18 - Iis

I had this same exact problem, except that i have never used IIS. While I was fixing another system bug, I had set the apache service to manual start, hoping to reduce the complexity of my system. After I fixed the other bug, apache wouldn't start. I futzed for a while, but all it took was setting apache back to automatic start: Start > Administrative Tools > Services.

Apparently when Apache starts this way, it claims port 80 before the SYSTEM process can.

hth someone. all my googling turned up the 'can't have IIS and Apache on the same machine.' this is for the other one percent of us.

Solution 19 - Iis

Try netstat -b, that may hopefully shed some light on the situation (showing what .exe is using the port). Good luck.

Solution 20 - Iis

For me it worked after stopping Web Deployment Agent Service.

Solution 21 - Iis

In case you use Razer product and install Razer Synapse software on your PC, it blocks the port 80 too.

It is not included in the netstat command so I am not able to troubleshoot it. Since there are many services included within the software, I can't analyze which one that blocks the port. After uninstalling the Razer Synapse, I can start the Apache server again on Windows 10.

Solution 22 - Iis

Identify the process programmatically

All the answers to date have required the user to do something interactive. This is how you find the PID when netstat shows you PID 4, without needing to open some GUI or handle a dialogue about depending services.

$Uri = "http://127.0.0.1:8989"    # for example


# Shows processes that have registered URLs with HTTP.sys
$QueueText = netsh http show servicestate view=requestq verbose=yes | Out-String

# Break into text chunks; discard the header
$Queues    = $QueueText -split '(?<=\n)(?=Request queue name)' | Select-Object -Skip 1

# Find the chunk for the request queue listening on your URI
$Queue     = @($Queues) -match [regex]::Escape($Uri -replace '/$')


if ($Queue.Count -eq 1)
{
    # Will be null if could not pick out exactly one PID
    $ProcessId = [string]$Queue -replace '(?s).*Process IDs:\s+' -replace '(?s)\s.*' -as [int]

    if ($ProcessId)
    {
        Write-Verbose "Identified process $ProcessId as the HTTP listener. Killing..."
        Stop-Process -Id $ProcessId -Confirm
    }
}

That really busted my chops. I hate HttpListener and wish I'd just used Pode.

Solution 23 - Iis

This wouldn't explain the PID side of things, but if you run Skype, it likes to use Port 80 for some reason.

Solution 24 - Iis

In my case, it happened after installing Microsoft Web Matrix. Uninstalling this trash along with "Microsoft Web Deploy" fixed the issue.

Solution 25 - Iis

None of these worked for me. I had to go to a SuperUser question.

> If it is a System Process—PID 4—you need to disable the HTTP.sys driver which is started on demand by another service, such as Windows Remote Management or Print Spooler on Windows 7 or 2008. > > There is two ways to disable it but the first one is safer: > > 1. - Go to device manager, select “show hidden devices” from menu/view, go to “Non-Plug and Play Driver”/HTTP, double click it to disable it (or set it to manual, some services depended on it). > > - Reboot and use netstat -nao | find ":80" to check if 80 is still used.

This is the one that worked for me!

Solution 26 - Iis

I was looking around for PID 4 and came to this question. From this answer and a blog post I figured that anything to do with PID 4 is probably a Windows Service, so you may want to look for the relevant services in services.msc.

Also, this process is run by System, which is considered another "logged-on" user.

Solution 27 - Iis

I had the same problem and it was because of IIS running on the server, you can stop it using IIS Manager if it is the case for you.

Solution 28 - Iis

If you are running Windows Server 2012 R2 then make sure to get rid of Work Folders: http://blogs.technet.com/b/filecab/archive/2013/10/15/windows-server-2012-r2-resolving-port-conflict-with-iis-websites-and-work-folders.aspx Removing Work Folders feature under File Server worked for me.

Solution 29 - Iis

BranchCache was my problem. My resolution was to run Powershell as an administrator and run:

Disable-BC -Force

Reference: https://docs.microsoft.com/en-us/powershell/module/branchcache/disable-bc?view=win10-ps

Solution 30 - Iis

For me I had to uninstall "Citrix Virtual Desktop Agent" on my VM

Solution 31 - Iis

PID=4 does not show up in Task Manager even after placing check mark on 'Show processes from all users". Well there is only one user.

However, netstat -b shows multiple connections poiting to the same PID=4 which on this computer displayed the following.

enter image description here

I have only chosen those pertaining to TCP protocol.

This was acquired while trouble shooting IIS which did not start after trying out many others. I do not think you should stop this process.

Solution 32 - Iis

type netstat -a -n -b -o |more

if stopping World Wide Web Publishing Service helps

then in IIS manager review each site's bindings settings, by selecting a site and on the side panel click on binding. then change port 80 to something else if required.

Solution 33 - Iis

I stopped World Wide Web Publishing Service and then it worked.

Solution 34 - Iis

Also, the "developer portal" (on Windows 10) causes System to listen on a TCP port. Usually ports 50080 and 50443.

Solution 35 - Iis

I just went to service and stopped web deployment agent

Solution 36 - Iis

After reading every answer on the question and trying everything, to no avail, I uninstalled and reinstalled XAMPP, which worked.

Solution 37 - Iis

WINDOWS 11

For me it was the World Wide Web Publishing Service who made System use port 80.

Hope this helps new Win11 users.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGiHView Question on Stackoverflow
Solution 1 - IisAntonView Answer on Stackoverflow
Solution 2 - IisAntonyView Answer on Stackoverflow
Solution 3 - IisinfocydeView Answer on Stackoverflow
Solution 4 - IisJules ColleView Answer on Stackoverflow
Solution 5 - IismanjiView Answer on Stackoverflow
Solution 6 - IisEng.FouadView Answer on Stackoverflow
Solution 7 - IisRobert HarveyView Answer on Stackoverflow
Solution 8 - IisDungView Answer on Stackoverflow
Solution 9 - IisOmerikoView Answer on Stackoverflow
Solution 10 - IisArun JosephView Answer on Stackoverflow
Solution 11 - IisseizuView Answer on Stackoverflow
Solution 12 - IisHammad KhanView Answer on Stackoverflow
Solution 13 - IisisJustMeView Answer on Stackoverflow
Solution 14 - IisgodzillaView Answer on Stackoverflow
Solution 15 - IisManideepView Answer on Stackoverflow
Solution 16 - IisPhoenixPanView Answer on Stackoverflow
Solution 17 - IisTanujView Answer on Stackoverflow
Solution 18 - IischangokunView Answer on Stackoverflow
Solution 19 - IisJon OnstottView Answer on Stackoverflow
Solution 20 - IisdanpopView Answer on Stackoverflow
Solution 21 - IismaurisrxView Answer on Stackoverflow
Solution 22 - IisFSCKurView Answer on Stackoverflow
Solution 23 - IisdavidtbernalView Answer on Stackoverflow
Solution 24 - IislaurentView Answer on Stackoverflow
Solution 25 - Iisjason.zissmanView Answer on Stackoverflow
Solution 26 - IisicedwaterView Answer on Stackoverflow
Solution 27 - IisKamiel AhmadpourView Answer on Stackoverflow
Solution 28 - IisKrzysztof J. ObaraView Answer on Stackoverflow
Solution 29 - IisJ. Erik ThompsonView Answer on Stackoverflow
Solution 30 - IisJerinawView Answer on Stackoverflow
Solution 31 - Iisuser2063329View Answer on Stackoverflow
Solution 32 - IisShimon DoodkinView Answer on Stackoverflow
Solution 33 - IisKnuturOView Answer on Stackoverflow
Solution 34 - IisRebroadView Answer on Stackoverflow
Solution 35 - IisJesse MwangiView Answer on Stackoverflow
Solution 36 - IisEdward TanguayView Answer on Stackoverflow
Solution 37 - IisHoussam OulachgarView Answer on Stackoverflow