"httpd dead but subsys locked"

 

================================== Description:

 

sudo service httpd restart

result:

Stopping httpd:                                            [FAILED]

Starting httpd:                                            [  OK  ]

then:

sudo service httpd status

result:

httpd dead but subsys locked

 

================================== Solution:

 

[root@serverwissem ~]#  ipcs -s | grep apache

0x00000000 425986     apache     600        1

0x00000000 720899     apache     600        1

0x00000000 1048580    apache     600        1

0x79001fff 196613     apache     666        1

0x00000000 1146886    apache     600        1

0x00000000 1605640    apache     600        1

0x00000000 1638409    apache     600        1

0x00000000 1671178    apache     600        1

0x00000000 1703947    apache     600        1

0x00000000 1802252    apache     600        1

0x00000000 1835021    apache     600        1

0x00000000 2064398    apache     600        1

0x00000000 2228239    apache     600        1

0x00000000 2621456    apache     600        1

0x00000000 3047441    apache     600        1

0x00000000 3080210    apache     600        1

[root@serverwissem ~]#

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

resource(s) deleted

resource(s) deleted

resource(s) deleted

resource(s) deleted

[root@serverwissem ~]# \rm /var/lock/subsys/httpd

[root@serverwissem ~]# cd

[root@serverwissem ~]# sudo service httpd restart

 

Restarting apache ...

Stopping httpd:                                            [FAILED]

Starting httpd:                                            [  OK  ]

 

[root@a021tnt01-eportal ~]# /etc/init.d/httpd status

httpd (pid  1281) is running...

[root@a021tnt01-eportal ~]#

[root@serverwissem ~]#  ipcs -s | grep apache

0x7900185c 17137666   apache     666        1

0x00000000 17170435   apache     600        1

0x00000000 17203204   apache     600        1

0x00000000 17235973   apache     600        1

[root@serverwissem ~]#

 

 

 

==================================

 

A second issue that we can face: AH00023: Couldn't create the mpm-accept mutex

 

==================================

 

The ERROR:

 

[core:emerg] [pid 5069] (28)No space left on device: AH00023: Couldn't create the mpm-accept mutex

 

 

 

 

 

The SOLUTION:

 

 

 

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

 

[root@globalreport01-eportal ~]## Update /etc/sysctl.conf

 

[root@globalreport01-eportal ~]# tail -3 /etc/sysctl.conf

 

# Semaphore

 

kernel.msgmni = 1024

 

kernel.sem = 250 256000 32 1024

 

[root@globalreport01-eportal ~]## Valider les nouveaux paramètres

 

[root@globalreport01-eportal ~]# sysctl -p

 

net.ipv4.ip_forward = 0

 

net.ipv4.conf.default.rp_filter = 1

 

net.ipv4.conf.default.accept_source_route = 0

 

kernel.sysrq = 0

 

kernel.core_uses_pid = 1

 

net.ipv4.tcp_syncookies = 1

 

error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key

 

error: "net.bridge.bridge-nf-call-iptables" is an unknown key

 

error: "net.bridge.bridge-nf-call-arptables" is an unknown key

 

kernel.msgmnb = 65536

 

kernel.msgmax = 65536

 

kernel.shmmax = 68719476736

 

kernel.shmall = 4294967296

 

kernel.msgmni = 1024

 

kernel.sem = 250 256000 32 1024

 

[root@globalreport01-eportal ~]#

 

 

Hope This Helps!!

Wissem MEDIOUNI