httpd.service: main process exited kill: cannot find process “”

Today apache was stuck with the below error and it was not starting at all.

Sep 15 06:18:24 server.example.com systemd[1]: Starting The Apache HTTP Server...
Sep 15 06:18:24 server.example.com httpd[15037]: [Thu Sep 15 06:18:24.591424 2016] [so:warn] [pid 15037] AH01574: module ruid2_module is alread...skipping
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 15 06:18:33 server.example.com kill[15038]: kill: cannot find process ""
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 15 06:18:33 server.example.com systemd[1]: Failed to start The Apache HTTP Server.
Sep 15 06:18:33 server.example.com systemd[1]: Unit httpd.service entered failed state.
Sep 15 06:18:33 server.example.com systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

It turned to be an semaphore issue.

Solution

RHEL CentOS 5/6

  • add the below to /etc/sysctl.conf

[sociallocker]

kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360
  • run
 sysctl -p

 

RHEL CentOS 7

  • add the below to /etc/sysctl.d/httpdfix.conf
kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360
    [/sociallocker]

  • run
sysctl -p /etc/sysctl.d/httpdfix.conf

I was able to restart apache after this fix. 🙂

0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Rodrigo Macedo
Rodrigo Macedo
4 years ago

Parabéns pelo post!!!
Perfeito!!
Checkmate!!

1
0
Would love your thoughts, please comment.x
()
x
Scroll to Top