[CentOS] weird apache issue

Fri Mar 7 12:32:51 UTC 2014
Tony Mountifield <tony at softins.co.uk>

In article <CAOZy0en0x_wrBZkVjZUpaTYMOD7Z_VTBOMorMukEDknrWNfQMA at mail.gmail.com>,
Tim Dunphy <bluethundr at gmail.com> wrote:
> Hey guys,
> 
>  Well it took a little while for me to be able to reproduce this. It seems
> that this problem is intermittent and sporadic.
> 
> But I tried running a sh -x /etc/init.d/httpd restart command once I
> reallized I had another incident of this and this is what I saw as the
> output:
> 

> + /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd'
> (98)Address already in use: make_sock: could not bind to address [::]:80
> (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
> no listening sockets available, shutting down

> 
> Not really sure how to interpret that, unfortunately.
> 
> 
> However looked for the pid file for apache and noticed that it DOESN'T
> EXIST!
> 
> [root at beta:~] #ls -l /var/run/httpd/
> total 0
> 
> 
> Well, that would explain why the init script isn';t able to kill the
> process. Maybe puppet is doing something weird with that pid file? I don't
> really know offhand, but I guess I will have to investigate that.
> 
> Thanks for all your input.

Have a look to see what process is actually doing the listening on port 80:

# netstat -natp

Look for a local address with a port of 80 and a state of LISTEN.

The final column shows you the PID and program name.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org