[CentOS] Reboot problem with Apache

Craig White craigwhite at azapple.com
Sat Dec 10 20:21:33 UTC 2011


On Sat, 2011-12-10 at 15:12 -0500, Weplica wrote:
> 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?
----
I think that there is a way but I don't know it off hand and I think you
can google it. You would need the key file generated when you generated
the cert/csr and in general, life is simpler if you strip the key out of
the cert/csr and provide both the key and the cert to apache so you
don't have to attend to the manual entry of this key each time you
restart the service.

Craig



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the CentOS mailing list