Port 80 in use by system - help needed.

Discussion in 'Webmastering & Programming' started by vitoc, Nov 6, 2008.

  1. vitoc

    vitoc n00bie

    Messages:
    4
    Joined:
    Nov 4, 2008
    I have a for me, very strange problem.

    I installed Windows Server 2008, on my freshly new bought server.
    During the installation process I also installed IIS.

    When the installation was complete, I had some disscussions regarding running IIS, or Apache. The vote fell for Apache. So I unistalled IIS. Removed it from services, etc.

    Installed Apache, and it complains about port80 is in use by microsoft HTTPAPI/2.0
    I have googled, but cant cant seem to find any info what so ever.

    I ran the command NETSTAT -p tcp -ano
    That command shows the PID for open ports.

    Port80 was used by PID4.

    So, I opened taskmanager, added "show pid" and to my suprise, PID4 is "NT Kernel & System" Owner SYSTEM

    Googled some more, came up with absolutely nothing.
    Decided to do a "ugly work around"
    I installed IIS again, and then ofcourse Apache says "Port 80 in use by IIS"
    So, I changed the default port in IIS to 82...
    And now we are back to "Port 80 in use by microsoft HTTPAPI/2.0"
    So, that didnt work.

    I have no idea what to do, I doubt there is a way for Apache to get higher priority then SYSTEM to the port.. So how do I fix it so that Port80 isnt in use by the system?

    If I try to go to localhost I get this:

    Not Found

    HTTP Error 404. The requested resource is not found.

    If I install IIS, I ofcourse get the IIS splashscreen.

    Anyone, please give me some ideas.

    Best Regards.
    /Vitoc
     
  2. Xipher

    Xipher 2[H]4U

    Messages:
    2,621
    Joined:
    Mar 15, 2004
    Make sure you stop the world wide web publishing service in the service manager. While IIS may not be installed the services it manages probably are.
     
  3. vitoc

    vitoc n00bie

    Messages:
    4
    Joined:
    Nov 4, 2008
    As a matter of fact, they are not installed, nor are they listed as a service.

    Thanks for a quick answer tho!
     
  4. mmtom

    mmtom Limp Gawd

    Messages:
    320
    Joined:
    Jan 9, 2003
    How did you remove it? You need to go into server manager, go to roles, and remove the IIS role.
     
  5. vitoc

    vitoc n00bie

    Messages:
    4
    Joined:
    Nov 4, 2008
    That is exactly how I did it.
     
  6. vitoc

    vitoc n00bie

    Messages:
    4
    Joined:
    Nov 4, 2008
    The problem is solved now, I have absolutely no idea how I solved. But it is now working with Apache.
    I know this cant have anything at all to do with it, but it started working after I installed MySQL.
     
  7. pcgeek86

    pcgeek86 Limp Gawd

    Messages:
    271
    Joined:
    Feb 14, 2007
    The only other thing I can think of is that WinRM uses port 80 too. WinRM will share the port with IIS if IIS is present. I'm not sure if WinRM runs under the System process or not though. That's all I can think of.
     
  8. D-OveRMinD

    D-OveRMinD [H]Lite

    Messages:
    116
    Joined:
    Aug 22, 2005
    I know this is an old thread, but it came up in google when searching for this issue.

    I had a VMware Virtual Center Server Service that would not start. I got the same errors as above with netstat saying PID 4 / System was using port 80.

    It wound up being Windows Remote Management that was using the port, as I did not have IIS installed.

    Worked perfectly, thanks guys!
     
  9. Chris Newman

    Chris Newman n00bie

    Messages:
    3
    Joined:
    Jun 16, 2011
    In order to use third-party HTTP services such as Apache on port 80, and 443 on Windows 7, and Server 2008; you will need to disable the following services then reboot:


    WebClient
    Web Deployment Agent Service
    Microsoft .NET Framework NGEN.




    If you use the Windows Firewall; you will need to set your ports for access in the Windows Firewall with Advanced Security snap-in for each designated port such as 80, 21, 443, 53, 22, etc.

    Hope this helps everyone.

    By disabling these services; Windows Remote Management can still be running on the host system.


    Additional Keynote: If you are using XAMPP, or Apache Win32 installer application variants; make sure to run/install as a system service. (i.e. Apache, XAMPP Apache, FileZilla, MySQL, Mercury, etc )
     
    Last edited: Jun 17, 2011
  10. mikeblas

    mikeblas [H]ard|DCer of the Month - May 2006

    Messages:
    12,855
    Joined:
    Jun 26, 2004
    Why do you have to disable NGEN?
     
  11. Chris Newman

    Chris Newman n00bie

    Messages:
    3
    Joined:
    Jun 16, 2011
    Disabling the Microsoft .NET NGEN is purely optional, but recommended if you are not using IIS as a web server. Granted, there are rare cases where I have seen the process use unnecessary CPU usage when port 80 is triggered by web server applications such as Apache. This could be a case-by-case basis, although I have only seen this occur in Server 2008 Enterprise Edition, and R2.
     
  12. mikeblas

    mikeblas [H]ard|DCer of the Month - May 2006

    Messages:
    12,855
    Joined:
    Jun 26, 2004
    I'm confused. You said "you have to", then you said "is purely optional, but recommended". Can you clarify which you mean? If it's optional, how would I decide if I must or shouldn't?
     
  13. shaithis

    shaithis n00bie

    Messages:
    1
    Joined:
    Feb 2, 2006
    Just hit the same myself...in my case it was SQL Server Reporting Services.

    So many apps can grab that port by default.
     
  14. userjack

    userjack n00bie

    Messages:
    43
    Joined:
    Sep 1, 2003
    Microsoft apps and 'proper' windows apps use the http.sys kernel driver for processing incoming packages on port 80 - that is they don't grab it. Real problem is Apache, Skype and the like, that use direct access.
     
  15. authoriseduser

    authoriseduser n00bie

    Messages:
    1
    Joined:
    Jan 7, 2012
    userjack, I was going nuts trying to figure out why my System process was using 30% of my CPU usage 24/7 until I read your post - I have Skype set to open when Windows starts up. That was it. Thank you very much.

    Microsoft will tell you that the cause of the System process being taken over is most likely malware. I have never had a single instance of malware on my PC in over ten years (I don't visit gambling sites, and I don't visit porn sites, and I don't open an attachment unless I am expecting it). What is offensive is that Microsoft actually owns Skype - and has owned it for some time now.

    I have put a post up on Skype's beta "gremlin" forum:

    http://community.skype.com/t5/Commu...-process-NT-Kernel-amp-System-and/td-p/406747

    So let's see if the Skype people actually do anything about it. I doubt it. It's probably written into the bones of the Skype programme.

    Anyway, thanks again for the fix!