Grab A Meat (Learning Day by Day)

Just another WordPress.com weblog

Posts Tagged ‘apache webserver’

Apache Server lock issue

Posted by grabameat on September 24, 2009

Os: Fedora Linux
Webserver : Apache ver 2.1.2

Issue:
Figured out Apache Server is not running when i run the command “service httpd status” until then i am running http://localhost/ in the browser which is working fine and unable to run any other programs

and when i used this command “# service httpd status: i got the below message

[root@hirodexdbserver ~]# service httpd status
httpd dead but subsys locked

i thought it might be some locks issue and restarted the server

#service httpd restart – i got the below error again.
**********************
[root@hirodexdbserver ~]# service httpd restart
Stopping httpd: [FAILED]
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
Unable to open logs
[FAILED]
You have mail in /var/spool/mail/root
[root@hirodexdbserver ~]# service httpd restart
**********************

Steps to Resolve the Issue
——————————–

after figuring out and looking at my httpd.conf file and make sure the pid file is pointing to the right file

PidFile run/httpd.pid

and change the path here to
go to /etc/rc.d/init.d/httpd open this file
and find the below line.

pidfile=${PIDFILE-/var/run/httpd/httpd.pid}

to:
pidfile=${PIDFILE-/var/run/httpd.pid}

Restart the Apache Server

# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

which should give you the above status.

hope this helps.

Thanks

Posted in apache | Tagged: | Leave a Comment »