[CentOS] Reboot problem with Apache

Sat Dec 10 19:59:01 UTC 2011
Ljubomir Ljubojevic <office at plnet.rs>

Vreme: 12/10/2011 08:44 PM, Weplica piše:
> Quoting "James A. Peltier"<jpeltier at sfu.ca>:
>
>> ----- Original Message -----
>> | I have CentOS 6 and with webmin/virtualmin panel, and each time that I
>> | reboot Apache can't start:
>> |
>> |
>> | Starting 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
>> |
>> | I do:
>> |
>> | netstat -tulpn| grep :80
>> | tcp 0 0 :::80 :::* LISTEN 1584/httpd
>> |
>> |
>> | killall -9 httpd
>> |
>> |
>> | And then Apache can start. But do you why thos problem in each reboot?
>> | I like to fix this problem.
>> |
>> | Thansks you.
>> |
>> | Ernesto
>>
>> Is there another web server starting before Apache?  For example,
>> nginx.  You could try and use lsof -p<PID>  or lsof -i :80 to see
>> what is holding the port before Apache.
>>
>
> Thanks James, I get this:
>
>
> lsof -i :80
> COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
> httpd   1507 root    5u  IPv6  10107      0t0  TCP *:http (LISTEN)
>
>
>
>
>
> lsof -p 1507
> COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
> httpd   1507 root  cwd    DIR    9,0     4096        2 /
> httpd   1507 root  rtd    DIR    9,0     4096        2 /

<snip>
>

Is this done just after you reboot and Apache refused to start? If not, 
please reboot and run those two commands *before* you do
"killall -9 -9 httpd".

But since you kill httpd  instances before Apache wants to start, it 
looks like some problem with httpd.

Have you only installed from repository, of have you been downloading 
source packages and compiling your self?

-- 

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant