1

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

4 Answers 4

1

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?

0

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.

0

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!

0

There is probably another instance of httpd running, do a

`lsof -i :80` 

and it should show if its running or no. If it is running do a

kill -9 <pid>

Also, you might want to check the /etc/httpd/httpd.conf file for errors as this might lead to a faulty start of the service

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .