Unable to start httpd service?

systemctl start httpd
→ Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.

After checking the status :->
root@host01 /# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-05-26 06:59:30 UTC; 1min 6s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 320 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 319 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=0/SUCCESS)
Main PID: 319 (code=exited, status=0/SUCCESS)

May 26 06:59:30 host01 systemd[1]: Starting The Apache HTTP Server…
May 26 06:59:30 host01 httpd[319]: httpd (pid 273) already running
May 26 06:59:30 host01 kill[320]: kill: cannot find process “”
May 26 06:59:30 host01 systemd[1]: httpd.service: control process exited, code=exite…s=1
May 26 06:59:30 host01 systemd[1]: Failed to start The Apache HTTP Server.
May 26 06:59:30 host01 systemd[1]: Unit httpd.service entered failed state.
May 26 06:59:30 host01 systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Hi @akshaydongar123

Can you provide me with the output of httpd -t and journalctl -xe

`

First when I tried to Start httpd service

root@host01 /# httpd -t
Syntax OK

Validate → journalctl -xe

In journalctl -xe, share that image where httpd error is showing. It is available in downside, so do more scroll down.


unable to do more to check these logs

@akshaydongar123 kindly check the correct commands below:
ApacheSolution

@KodeKloud Can you check once why i am unable to start the httpd service . is it because some process is already running ?

Share the output of httpd service. Do this in the terminal window
sudo journalctl -u httpd.service

HI @Tej-Singh-Rana I dont know what was the issues . but now i am able to install , start & check the status of httpd service

Hi @Tej-Singh-Rana

I am also facing the same issue, For your reference PF the below attachment

I am unable to start the httpd.service & I am unable to find the httpd.service also while I am using systemctl start httpd.socket (Here it only shows the httpd.socket only, not httpd.service)

Thanks in advance!!

Hi @ssumanth222
Please check the output. It’s clearly stated that there is a syntax error in httpd.conf file.

@Tej-Singh-Rana

I am also having issue with httpd. I followed the thread and checked below are the logs can you please help me with this.

[thor@app01 certs]$ sudo vi /etc/httpd/conf.d/ssl.conf

[thor@app01 certs]$ sudo service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.

[thor@app01 certs]$ sudo journalctl -u httpd.service
– Logs begin at Wed 2022-09-21 04:41:04 UTC, end at Wed 2022-09-21 04:54:09 UTC. –
Sep 21 04:43:53 app01.com systemd[1]: Collecting httpd.service
Sep 21 04:43:54 app01.com systemd[1]: Trying to enqueue job httpd.service/try-restart/replace
Sep 21 04:43:54 app01.com systemd[1]: Installed new job httpd.service/nop as 99
Sep 21 04:43:54 app01.com systemd[1]: Enqueued job httpd.service/nop as 99
Sep 21 04:43:54 app01.com systemd[1]: Job httpd.service/nop finished, result=done
Sep 21 04:43:54 app01.com systemd[1]: Collecting httpd.service
Sep 21 04:43:54 app01.com systemd[1]: Trying to enqueue job httpd.service/start/replace
Sep 21 04:43:54 app01.com systemd[1]: Installed new job httpd.service/start as 101
Sep 21 04:43:54 app01.com systemd[1]: Enqueued job httpd.service/start as 101
Sep 21 04:43:54 app01.com systemd[1]: About to execute: /usr/sbin/httpd $OPTIONS -DFOREGROUND
Sep 21 04:43:54 app01.com systemd[1]: Forked /usr/sbin/httpd as 996
Sep 21 04:43:54 app01.com systemd[1]: httpd.service changed dead → start
Sep 21 04:43:54 app01.com systemd[1]: Starting The Apache HTTP Server…
Sep 21 04:43:54 app01.com systemd[996]: Executing: /usr/sbin/httpd -DFOREGROUND
Sep 21 04:43:54 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:43:54 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Processing requests…, MAINPID=996)
Sep 21 04:43:54 app01.com systemd[1]: httpd.service: got MAINPID=996
Sep 21 04:43:54 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:43:54 app01.com systemd[1]: httpd.service changed start → running
Sep 21 04:43:54 app01.com systemd[1]: Job httpd.service/start finished, result=done
Sep 21 04:43:54 app01.com systemd[1]: Started The Apache HTTP Server.
Sep 21 04:43:54 app01.com systemd[1]: httpd.service: got STATUS=Processing requests…
Sep 21 04:44:03 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:03 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:03 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:03 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:44:13 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:13 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:13 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:13 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:44:23 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:23 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:23 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:23 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:44:33 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:33 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:33 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:33 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:44:43 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:43 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:43 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:43 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:44:53 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:44:53 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:44:53 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:44:53 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:03 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:03 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:03 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:03 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:13 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:13 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:13 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:13 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:23 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:23 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:23 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:23 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:33 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:33 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:33 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:33 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:43 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:43 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:43 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:43 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:45:53 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:45:53 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:45:53 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:45:53 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:46:03 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:46:03 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:46:03 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:46:03 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:46:13 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:46:13 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:46:13 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:46:13 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:46:23 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:49:43 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:49:43 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:49:43 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:49:53 app01.com systemd[1]: Got notification message for unit httpd.service
Sep 21 04:49:53 app01.com systemd[1]: httpd.service: Got notification message from PID 996 (READY=1, STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec)
Sep 21 04:49:53 app01.com systemd[1]: httpd.service: got READY=1
Sep 21 04:49:53 app01.com systemd[1]: httpd.service: got STATUS=Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec
Sep 21 04:49:54 app01.com systemd[1]: Trying to enqueue job httpd.service/restart/replace
Sep 21 04:49:54 app01.com systemd[1]: Installed new job httpd.service/restart as 216
Sep 21 04:49:54 app01.com systemd[1]: Enqueued job httpd.service/restart as 216
Sep 21 04:49:54 app01.com systemd[1]: About to execute: /bin/kill -WINCH ${MAINPID}
Sep 21 04:49:54 app01.com systemd[1]: Forked /bin/kill as 1316
Sep 21 04:49:54 app01.com systemd[1]: httpd.service changed running → stop
Sep 21 04:49:54 app01.com systemd[1]: Stopping The Apache HTTP Server…
Sep 21 04:49:54 app01.com systemd[1316]: Executing: /bin/kill -WINCH 996
Sep 21 04:49:54 app01.com systemd[1]: Child 1316 belongs to httpd.service
Sep 21 04:49:54 app01.com systemd[1]: httpd.service: control process exited, code=exited status=0
Sep 21 04:49:54 app01.com systemd[1]: httpd.service got final SIGCHLD for state stop
Sep 21 04:49:54 app01.com systemd[1]: httpd.service changed stop → stop-sigterm
Sep 21 04:49:55 app01.com systemd[1]: Child 996 belongs to httpd.service
Sep 21 04:49:55 app01.com systemd[1]: httpd.service: main process exited, code=exited, status=0/SUCCESS
Sep 21 04:49:55 app01.com systemd[1]: httpd.service changed stop-sigterm → dead
Sep 21 04:49:55 app01.com systemd[1]: Job httpd.service/restart finished, result=done
Sep 21 04:49:55 app01.com systemd[1]: Stopped The Apache HTTP Server.
Sep 21 04:49:55 app01.com systemd[1]: Converting job httpd.service/restart → httpd.service/start
Sep 21 04:49:55 app01.com systemd[1]: httpd.service: cgroup is empty
Sep 21 04:49:55 app01.com systemd[1]: About to execute: /usr/sbin/httpd $OPTIONS -DFOREGROUND
Sep 21 04:49:55 app01.com systemd[1]: Forked /usr/sbin/httpd as 1325
Sep 21 04:49:55 app01.com systemd[1]: httpd.service changed dead → start
Sep 21 04:49:55 app01.com systemd[1]: Starting The Apache HTTP Server…
Sep 21 04:49:55 app01.com systemd[1325]: Executing: /usr/sbin/httpd -DFOREGROUND
Sep 21 04:49:55 app01.com systemd[1]: Child 1325 belongs to httpd.service
Sep 21 04:49:55 app01.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 21 04:49:55 app01.com systemd[1]: About to execute: /bin/kill -WINCH ${MAINPID}
Sep 21 04:49:55 app01.com systemd[1]: Forked /bin/kill as 1326
Sep 21 04:49:55 app01.com systemd[1]: httpd.service changed start → stop
Sep 21 04:49:55 app01.com systemd[1326]: Executing: /bin/kill -WINCH
Sep 21 04:49:55 app01.com kill[1326]: kill: cannot find process “”
Sep 21 04:49:55 app01.com systemd[1]: Child 1326 belongs to httpd.service
Sep 21 04:49:55 app01.com systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 21 04:49:55 app01.com systemd[1]: httpd.service got final SIGCHLD for state stop
Sep 21 04:49:55 app01.com systemd[1]: httpd.service changed stop → failed
Sep 21 04:49:55 app01.com systemd[1]: Job httpd.service/start finished, result=failed
Sep 21 04:49:55 app01.com systemd[1]: Failed to start The Apache HTTP Server.
Sep 21 04:49:55 app01.com systemd[1]: Unit httpd.service entered failed state.
Sep 21 04:49:55 app01.com systemd[1]: httpd.service failed.
Sep 21 04:49:55 app01.com systemd[1]: httpd.service: cgroup is empty
Sep 21 04:53:30 app01.com systemd[1]: Trying to enqueue job httpd.service/restart/replace
Sep 21 04:53:30 app01.com systemd[1]: Installed new job httpd.service/restart as 308
Sep 21 04:53:30 app01.com systemd[1]: Enqueued job httpd.service/restart as 308
Sep 21 04:53:30 app01.com systemd[1]: Job httpd.service/restart finished, result=done
Sep 21 04:53:30 app01.com systemd[1]: Converting job httpd.service/restart → httpd.service/start
Sep 21 04:53:30 app01.com systemd[1]: About to execute: /usr/sbin/httpd $OPTIONS -DFOREGROUND
Sep 21 04:53:30 app01.com systemd[1]: Forked /usr/sbin/httpd as 1377
Sep 21 04:53:30 app01.com systemd[1]: httpd.service changed failed → start
Sep 21 04:53:30 app01.com systemd[1]: Starting The Apache HTTP Server…
Sep 21 04:53:30 app01.com systemd[1377]: Executing: /usr/sbin/httpd -DFOREGROUND
Sep 21 04:53:30 app01.com systemd[1]: Child 1377 belongs to httpd.service
Sep 21 04:53:30 app01.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 21 04:53:30 app01.com systemd[1]: About to execute: /bin/kill -WINCH ${MAINPID}
Sep 21 04:53:30 app01.com systemd[1]: Forked /bin/kill as 1378
Sep 21 04:53:30 app01.com systemd[1]: httpd.service changed start → stop
Sep 21 04:53:30 app01.com systemd[1378]: Executing: /bin/kill -WINCH
Sep 21 04:53:30 app01.com kill[1378]: kill: cannot find process “”
Sep 21 04:53:30 app01.com systemd[1]: Child 1378 belongs to httpd.service
Sep 21 04:53:30 app01.com systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 21 04:53:30 app01.com systemd[1]: httpd.service got final SIGCHLD for state stop
Sep 21 04:53:30 app01.com systemd[1]: httpd.service changed stop → failed
Sep 21 04:53:30 app01.com systemd[1]: Job httpd.service/start finished, result=failed
Sep 21 04:53:30 app01.com systemd[1]: Failed to start The Apache HTTP Server.
Sep 21 04:53:30 app01.com systemd[1]: Unit httpd.service entered failed state.
Sep 21 04:53:30 app01.com systemd[1]: httpd.service failed.
Sep 21 04:53:30 app01.com systemd[1]: httpd.service: cgroup is empty
Sep 21 04:54:03 app01.com systemd[1]: Trying to enqueue job httpd.service/restart/replace
Sep 21 04:54:03 app01.com systemd[1]: Installed new job httpd.service/restart as 400
Sep 21 04:54:03 app01.com systemd[1]: Enqueued job httpd.service/restart as 400
Sep 21 04:54:03 app01.com systemd[1]: Job httpd.service/restart finished, result=done
Sep 21 04:54:03 app01.com systemd[1]: Converting job httpd.service/restart → httpd.service/start
Sep 21 04:54:03 app01.com systemd[1]: About to execute: /usr/sbin/httpd $OPTIONS -DFOREGROUND
Sep 21 04:54:03 app01.com systemd[1]: Forked /usr/sbin/httpd as 1401
Sep 21 04:54:03 app01.com systemd[1]: httpd.service changed failed → start
Sep 21 04:54:03 app01.com systemd[1]: Starting The Apache HTTP Server…
Sep 21 04:54:03 app01.com systemd[1401]: Executing: /usr/sbin/httpd -DFOREGROUND
Sep 21 04:54:03 app01.com systemd[1]: Child 1401 belongs to httpd.service
Sep 21 04:54:03 app01.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 21 04:54:03 app01.com systemd[1]: About to execute: /bin/kill -WINCH ${MAINPID}
Sep 21 04:54:03 app01.com systemd[1]: Forked /bin/kill as 1402
Sep 21 04:54:03 app01.com systemd[1]: httpd.service changed start → stop
Sep 21 04:54:03 app01.com systemd[1402]: Executing: /bin/kill -WINCH
Sep 21 04:54:03 app01.com kill[1402]: kill: cannot find process “”
Sep 21 04:54:03 app01.com systemd[1]: Child 1402 belongs to httpd.service
Sep 21 04:54:03 app01.com systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 21 04:54:03 app01.com systemd[1]: httpd.service got final SIGCHLD for state stop
Sep 21 04:54:03 app01.com systemd[1]: httpd.service changed stop → failed
Sep 21 04:54:03 app01.com systemd[1]: Job httpd.service/start finished, result=failed
Sep 21 04:54:03 app01.com systemd[1]: Failed to start The Apache HTTP Server.
Sep 21 04:54:03 app01.com systemd[1]: Unit httpd.service entered failed state.
Sep 21 04:54:03 app01.com systemd[1]: httpd.service failed.
Sep 21 04:54:03 app01.com systemd[1]: httpd.service: cgroup is empty

1 Like

Hi @shoaibshakilshaikh ,
Have you got a chance to check the Solution?

I checked the httpd conf files checked the syntax, googled.
Rest labs and followed all commands as given in the solution.

But still getting this error, can you please help me with this I am not so familiar with linuxhave basic knowledge.

Hi @shoaibshakilshaikh,
I checked the lab and followed the Hint/Solution steps and didn’t see any issues.
Can you please check the certificate and key location?

@Tej-Singh-Rana

Thanks for the help i understood what mistake I was doing.
Instead of replacing the localhost.crt / localhost.key I was adding the app01 csr/key below localhost in
SSLCertificateFile and SSLCertificateKeyFile.

I removed the existing localhost csr and key and added app01’s csr and key and it worked.

Thanks a lot for the help much appreciated.

I am having similar issue when i ran this httpd -t i got syntax ok and i went further to run journalctl -xe i got the following logs xfs filesystem being remounted at /tmp supports timestamps until 2038 (0x7fffffff) [server]: xfs filesystem being remounted at /var/tmp supports timestamps until 2038 (0x7fffffff) [server]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 [server]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 [server]: no listening sockets available, shutting down [server]: AH00015: Unable to open logs [server]: httpd.service: main process exited, code=exited, status=1/FAILURE [server]: Failed to start The Apache HTTP Server.