I know similar question exists: Job for httpd.service failed
But it is not same as mine. I tried to restart apache using
sudo apachectl restart
I get the following error:
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Here are the logs from systemctl status httpd.service
:
[munna@localhost ~]$ systemctl status -l httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-09-27 19:08:26 BDT; 12min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 6262 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 6258 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 6258 (code=exited, status=1/FAILURE)
[munna@localhost ~]$ su
Password:
[root@localhost munna]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost munna]# systemctl status -l httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-09-27 19:21:41 BDT; 10s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 7056 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 7052 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 7052 (code=exited, status=1/FAILURE)
Sep 27 19:21:41 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Sep 27 19:21:41 localhost.localdomain httpd[7052]: AH00526: Syntax error on line 18 of /etc/httpd/conf.d/phpMyAdmin.conf:
Sep 27 19:21:41 localhost.localdomain httpd[7052]: allow not allowed here
Sep 27 19:21:41 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 27 19:21:41 localhost.localdomain kill[7056]: kill: cannot find process ""
Sep 27 19:21:41 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Sep 27 19:21:41 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Sep 27 19:21:41 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Sep 27 19:21:41 localhost.localdomain systemd[1]: httpd.service failed.
[root@localhost munna]#
Here is the output of journalctl -xn
:
[root@localhost munna]# journalctl -xn
-- Logs begin at Tue 2016-09-27 18:43:34 BDT, end at Tue 2016-09-27 19:00:01 BDT
Sep 27 19:00:01 localhost.localdomain systemd[1]: Created slice user-0.slice.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Starting user-0.slice.
-- Subject: Unit user-0.slice has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun starting up.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Started Session 4 of user root
-- Subject: Unit session-4.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-4.scope has finished starting up.
--
-- The start-up result is done.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Starting Session 4 of user roo
-- Subject: Unit session-4.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-4.scope has begun starting up.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Started Session 5 of user root
-- Subject: Unit session-5.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-5.scope has finished starting up.
--
-- The start-up result is done.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Starting Session 5 of user roo
-- Subject: Unit session-5.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-5.scope has begun starting up.
Sep 27 19:00:01 localhost.localdomain CROND[5612]: (root) CMD (/usr/lib64/sa/sa1
Sep 27 19:00:01 localhost.localdomain CROND[5613]: (root) CMD (/etc/webmin/bandw
Sep 27 19:00:01 localhost.localdomain systemd[1]: Removed slice user-0.slice.
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Stopping user-0.slice.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
lines 35-57/57 (END)
-- Unit session-5.scope has finished starting up.
--
-- The start-up result is done.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Starting Session 5 of user root.
-- Subject: Unit session-5.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-5.scope has begun starting up.
Sep 27 19:00:01 localhost.localdomain CROND[5612]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Sep 27 19:00:01 localhost.localdomain CROND[5613]: (root) CMD (/etc/webmin/bandwidth/rotate.pl)
Sep 27 19:00:01 localhost.localdomain systemd[1]: Removed slice user-0.slice.
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished shutting down.
Sep 27 19:00:01 localhost.localdomain systemd[1]: Stopping user-0.slice.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun shutting down.
~
~
~
~
~
~
~
~
~
~
~
lines 35-57/57 (END)