CentOS

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

JJ
Jobin Joseph · Founder and CEO
·Published 15 September 2016·1 min read

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

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

RHEL CentOS 7

kernel.msgmni = 1024
kernel.sem = 250 32000 100 512
kernel.shmmax = 16296951808
kernel.shmall = 17039360
sysctl -p /etc/sysctl.d/httpdfix.conf

I was able to restart apache after this fix. 🙂

Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →