Tuesday, July 23, 2013

Error make_sock: could not bind to address 0.0.0.0:80 when starting Apache 2 on Windows 7

As you can guess the error make_sock: could not bind to address 0.0.0.0:80 can mean that TCP socket 80 is used by another process.

To check this in Windows you can simply run netstat - ano. In my case netstat returns:

 TCP       0.0.0.0:80             0.0.0.0:0              NASŁUCHIWANIE    4
 TCP       0.0.0.0:135            0.0.0.0:0              NASŁUCHIWANIE    888
 TCP       0.0.0.0:445            0.0.0.0:0              NASŁUCHIWANIE    4
 TCP       0.0.0.0:554            0.0.0.0:0              NASŁUCHIWANIE    2620
 TCP       0.0.0.0:623            0.0.0.0:0              NASŁUCHIWANIE    176
 TCP       0.0.0.0:2869           0.0.0.0:0              NASŁUCHIWANIE    4
 TCP       0.0.0.0:7112           0.0.0.0:0              NASŁUCHIWANIE    1136
 TCP       0.0.0.0:10243          0.0.0.0:0              NASŁUCHIWANIE    4
 TCP       0.0.0.0:16992          0.0.0.0:0              NASŁUCHIWANIE    176
 TCP       0.0.0.0:49152          0.0.0.0:0              NASŁUCHIWANIE    548

As you can see port 80 is already used by process with id 4.
Ok. Ok. Let's check the process with PID 4?



Hmm. Surprise. What the hell it can be. Maybe IIS - I haven't installed this but I have Visual Studio and maybe IIS I have "out of the box"? How to check this?

In my case was enough to use the command:

net stop http

to stop all "http related" services. After system restart Apache started successfully.

No comments:

Post a Comment