Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm hoping someone can help me fairly urgently.
I've been trying to get me Centos server back up and running.

I did a yum update yesterday which went as planned, but this morning I've found that httpd is dead (I'm guessing on logrotate).

I can issue a "service httpd start" and it appears to start OK but status reveals "httpd dead but subsys locked".
I can remove the subsys lock and start again but then I get:
"(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs"

Then running netstat -plant shows httpd running on

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8191/httpd
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 8191/httpd

I can remove Listen 80 from my httpd.conf and this removes the first error but it then displays: "(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs"

There's no entry for 443 in my conf?

Having also run tail -f /var/log/messages I get one worrying entry:
www kernel: httpd[8189]: segfault at 0 ip b7367c48 sp bf89f4fc error 4 in libc-2.5.so[b72f8000+152000]

Any thoughts please?

Yours, Chris

share|improve this question

3 Answers 3

You probably still have httpd running on port 80 en 443. Try pkill httpd; or pkill -9 httpd
Then run netstat -plant again and check if httpd on port 80 and 443 is gone.
Now start apache again.

You say you don't have 443 in your config, what does "grep -ril 443" /etc/apache2 say?

share|improve this answer

you can also check if there are any processes bound to 443 with lsof -i tcp:443 ; then you can kill the process or find the offending service.

share|improve this answer

Something similar happened to me. Turns out httpd really was running the whole time! Apparently the "httpd dead but subsys locked" message can misleadingly show up if you have insufficient permissions when you check the service status. Switch to root and see if you get a different message, or ping your server, you might just find it's working!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.