Centos 7 上的 httpd.service 失败

Centos 7 上的 httpd.service 失败

由于 Apache 错误,我在使用 Centos 7 VPS 时遇到了问题:

当我做:

[root@vm01 ~]# apachectl restart
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

出现此状态错误:

[root@vm01 ~]# systemctl status 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 Fri 2016-12-16 16:58:10 WET; 4min 41s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 555 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 553 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 553 (code=exited, status=1/FAILURE)

Dec 16 16:58:10 vm01 systemd[1]: Starting The Apache HTTP Server...
Dec 16 16:58:10 vm01 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 16 16:58:10 vm01 kill[555]: kill: cannot find process ""
Dec 16 16:58:10 vm01 systemd[1]: httpd.service: control process exited, code=exited status=1
Dec 16 16:58:10 vm01 systemd[1]: Failed to start The Apache HTTP Server.
Dec 16 16:58:10 vm01 systemd[1]: Unit httpd.service entered failed state.
Dec 16 16:58:10 vm01 systemd[1]: httpd.service failed.

以及日志打印输出:

[root@vm01 ~]# journalctl -xn
-- Logs begin at Fri 2016-12-16 12:41:32 WET, end at Fri 2016-12-16 17:04:46 WET. --
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Unit systemd-logind.service entered failed state.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: systemd-logind.service failed.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: systemd-logind.service has no holdoff time, scheduling restart.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Starting Login Service...
-- Subject: Unit systemd-logind.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-logind.service has begun starting up.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Listening on udev Kernel Socket.
-- Subject: Unit systemd-udevd-kernel.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-udevd-kernel.socket has finished starting up.
-- 
-- The start-up result is done.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Starting udev Kernel Socket.
-- Subject: Unit systemd-udevd-kernel.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-udevd-kernel.socket has begun starting up.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Listening on udev Control Socket.
-- Subject: Unit systemd-udevd-control.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-udevd-control.socket has finished starting up.
-- 
-- The start-up result is done.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Starting udev Control Socket.
-- Subject: Unit systemd-udevd-control.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-udevd-control.socket has begun starting up.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: Starting udev Kernel Device Manager...
-- Subject: Unit systemd-udevd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-udevd.service has begun starting up.
Dec 16 13:22:59 vm01.jarodmobile.com systemd[1]: systemd-journald.service watchdog timeout (limit 3min)!

我一直在寻找解决方案,但没有成功。你能帮忙吗?

问候,Jaime

答案1

您发布的 journalctl 输出显然毫无用处。启动信息也是如此。我通常使用journalctl -xe反向工作。如果这没有显示任何有用的信息,您可以尝试查看 httpd 错误日志,其中应该包含一些相关信息。

相关内容