httpd wont start

ARUN Posted in HTTPD
0

[root@a24uall httpd]# service httpd start
Starting httpd: [Mon Jun 21 05:32:03 2010] [warn] module jk_module is already loaded, skipping
[Mon Jun 21 05:32:03 2010] [warn] module ssl_module is already loaded, skipping
(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]
[root@a24uall httpd]#

Solution :

[root@a24uall httpd]# for i in `ps auwx | grep -i nobody | awk {‘print $2′}`; do kill -9 $i; done

[root@a24uall httpd]# for i in `lsof -i :80 | grep http | awk {‘ print $2′}`; do kill -9 $i; done

Try restarting httpd

To check semaphores use :

ipcs -s

To clearout semaphores use the following :

[root@a24uall httpd]# for i in `ipcs -s | grep nobody | awk ‘{print $2}’`; do ipcrm -s $i; done

Try restarting apache again

semaphores

ARUN Posted in HTTPD
0

ipcs -s    –> Shows the number of semaphores in use. If its more that 3-4 apache might not work properly.

ipcrm -s semid –> Remove semaphores

or

for i in `ipcs -s |grep nobody|awk ‘{print $2}’` do ipcrm -s $i done  –> Used in WHM servers only and when there are a lot of semaphores.

Please restart httpd after the semaphores are removed.

Error logs shows :

[Sat Jan 15 20:54:39 2011] [notice] mod_python: Creating 4 session mutexes based on 80 max processes and 0 max threads.
[Sat Jan 15 20:54:39 2011] [error] (28)No space left on device: mod_python: Failed to create global mutex 1 of 4 (/tmp/mpmtx38501).
Configuration Failed

[Sat Jan 15 20:54:39 2011] [notice] mod_python: Creating 4 session mutexes based on 80 max processes and 0 max threads.[Sat Jan 15 20:54:39 2011] [error] (28)No space left on device: mod_python: Failed to create global mutex 1 of 4 (/tmp/mpmtx38501).Configuration Failed

OR

SCRIPT TO CLEAR ALL

for i in `ipcs -s | awk ‘{print $2}’`; do ipcrm -s $i; done