[CentOS] Reboot problem with Apache

Sat Dec 10 20:12:46 UTC 2011
Weplica <info at weplica.com>

Quoting 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?
>


Yes just after reboot I have what I show you.

Maybe the problem is that when I restart servide httpd withou  
rebooting before to reboot I need to tell my pasword for SSL  
certificate. Maybe when rebooting I can't give SSL password so it try  
to reboot and keep like this disabled?


#lsof -i :80
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
httpd   1507 root    5u  IPv6  10107      0t0  TCP *:http (LISTEN)

When I start manual way:

# killall -9 httpd
# service httpd start

Starting httpd: Apache/2.2.15 mod_ssl/2.2.15 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.

Server kuales.com:443 (RSA)
Enter pass phrase:

OK: Pass Phrase Dialog successful.



Can I submit RSA key in automatic way?