HOWTO: httpd dead but subsys locked

I just finished installing CentOS 5.6 on my machine and when i tried to start httpd service I encountered this error:

"httpd dead but subsys locked"

Googling around I found this commands

check for running processes

ipcs -s | grep apache

(more info @http://linux.about.com/library/cmd/blcmdl8_ipcs.htm)

stop processes

ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'

Remove httpd lock file

cd /var/lock/subsys && rm httpd
service httpd restart


Post a Comment