Windows Tip

Something was listening on Port 80 and preventing my local webserver from working on my Windows XP laptop. Here’s how I tracked it down: Hit Windows Key + R, which brings up the Run dialog, then type “cmd” and press enter. You’ll be on a command line.

Type netstat -a -o -n and it’ll bring up a network list, I looked for one with 0.0.0.0:80 as the local address and noted down the PID of 2600. To find out what PID 2600 was (hopefully not a trojan) I typed tasklist /FI "PID eq 2600" which means show me a tasklist, and filter (/FI) where the PID (process ID) is equal to 2600. This told me that it was Skype.exe that was running something on port 80 locally.

Finally I killed it using taskkill /PID 2600 and Skype was gone and I was able to start up my web server locally and do a little bit of offline coding. Windows actually has a pretty handy command line once you learn your way around it, it’s just the syntax is so inelegant to me after spending all day on Linux terminals. A final tip, you can type /? after most Windows commands to get the equivilent of a man page for that command.

Now for why Skype was listening or port 80 on localhost and serving blank pages… Ihave no idea.

35 thoughts on “Windows Tip

  1. Or you could simply download and run TCPView from SysInternals.com and all that info is in one place.

    SysInternals also has a large number of tools that do a lot of useful things. All free and all very well written.

  2. 0.0.0.0 – not a localhost. It`s a mask, that include ALL addreses. If you don`t want Skype at port 80, tak off a tick at Tools=>Options=>Connection.

  3. Skype use port 80 for some communication. So skype will run behind a firewall or an NAT.

    Stop Skype, Run your Server, and start Skype.

    An alternative port of Skype is the 443 for the same reason.

  4. Skype uses port 80 in case a firewall is blocking the default port. This also applies to receiving files, so the port has to be opened in advance.

    Actually, Skype is very persistent when it comes to establish a connection.

  5. Skype uses port 80 and a number of other ports (1191, 3277 on my machine at present) in order to build it’s peer-to-peer network for call routing.

    If you open the skype options dialogue and untick the “use port 80 and 443 as alternatives for incoming connections” checkbox on the Connection pane it should stop listening on port 80.

  6. I was having the EXACT same problem. Couldn’t figure out why I couldn’t start up IIS…
    Stupid Skype.

    Options->Connections->’Use Port 80 and 443 as alternatives for incoming connections’ is the switch you want to turn off in Skype.

  7. Wouldn’t netstat -a -b work just as well in just one command? It works just as well on XP Home, too, where tasklist and taskkill are missing.

  8. Or you could use TCPView. The Sysinternals tools are worth installing on a notebook, even if this way works just as well.

    Skype does listen to 80 and occasionally 443 as well. I theorize this is to allow someone behind a firewall to use you as a relay (did I mean supernode?). I unchecked the tickbox in Skype options that allows it to grab port 80 though – that lets me run XAMPP on the notebook while still having Skype on.

  9. It might have something to do with the ‘Allow my status to be shown on the web’ option (you can find this under options – privacy).

    You could try to change this setting to see if this resolves your problem?

  10. Matt:

    If Skype can’t establish a connection though its designated ports (whatever those are), the fallback position is to use ports 80 and 443. Says so right in the configuration/preferences.

    smp

  11. Matt,

    I had the same problem with Skype. Apparently it uses ports 80 and 443 as “alternatives for incoming connections”. I’m thinking this makes it easier to slip their traffic through firewalls.

    There’s a checkbox to disable this under Options > Connections.

    Thanks.

  12. You can disable that in the Skype options (connection) 🙂
    Port 80 is somehow supposed to prevent NAT-problems, or so, i honestly don’t know.

  13. This is so ironic that you mentioned Skype. I wonder if they’re having problems. Mine just locked up, and Skype had indicated they were having trouble connecting to their communications server. I rebooted, and things are now fine. Perhaps there’s a security leak in their client?

  14. as for skype – tools/options/connection (i hope I get it right, cause I’m using polish version of skype…) – there is a checkbox which sets skype to use ports 80 & 443 as an alternative to incoming connections.

    just turn it off – and your local webserver will rock.

    had the same problem once – I used TcpView from SysInternals which propably doeas the same what calling netstat doeas.

  15. By default, Skype listens to port 80 and 443 as alternative incoming ports. So when viewing your localhost, the request gets intercepted by Skype.

    Solution: Go to the “Connections” tab in the Skype options, and uncheck “Use port 80 and 443 as alternative incoming connections”.

  16. Skype was listening on port 80 because it is a P2P application. That is, your computer serves data for other Skype users as long as you leave the client open. (That’s why it wants to start when you start up your computer.) This is why some places, like San Jose State, want to ban Skype.

    One of the reasons eBay felt that Skype was worth so much money because despite carrying millions of calls, its own servers carry very little traffic. They depend on folks who leave the app open to carry calls for everyone. Thus, their monthly outgoing cash flow is fairly reasonable (unlike YouTube, which spends millions of dollars every month on bandwidth!)

  17. I got ethe same problem… I know that Skype is using the port 80 to perform firewall traversal however, I was wandering if it is possible to enforce skype not to listen all interface (0.0.0.0:80) but only the web connected interface (leaving free 127.0.0.1:80).

    In that case, it does not remove the firewall traversal feature of skype (which we all agree is great) and allows you to have a local webserver to experiment your blog for example on the localhost…

    I asked on a Skype board but didn’t get any answer so far…

  18. Or you may use Process Explorer from Sysinternals. On the TCP IP tab it will show what connections a process is using and you can kill it from there.

  19. For those unimpressed with the Windows command line[1], you might like to see its future incarnation, called Powershell. It’s taken a lot of inspiration from Unix and other sources. Even has built in documentation more like man pages than the usual MS help.

    [1] Though for those of us who worked through from early versions of DOS, it’s a powerful tool…

  20. Its a handy tip to know. Discovered it a while back having installed apache after skype though my method was a little bit more like “lets end this, see if that fixes it” while going down through taskman. 🙂

  21. You are not only a genius with WP, but this was great information. I did find that under Skype’s setup, under the Advanced area, there is a checkbox that tells it to use ports 80 and 443 as alternates. I unchecked that, and my conflict was gone.

  22. Dude! This just solved my problem! Been an IIS user forever; just installed Apache for the first time and it couldn’t bind to port 80. Thank you kindly.

Leave a Reply to Erica DouglassCancel reply