【问题标题】:CentOS 7 apachectl httpd.service fails to startCentOS 7 apachectl httpd.service 无法启动
【发布时间】:2015-07-15 23:32:31
【问题描述】:

我正在构建 https://github.com/devopsgroup-io/catapult-release-management 并且每隔一段时间尝试 apachectl start 一个错误:

httpd.service 的作业失败。有关详细信息,请参阅“systemctl status httpd.service”和“journalctl -xn”。

systemctl status httpd.service 输出:

httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
   Active: failed (Result: exit-code) since Wed 2015-07-15 19:25:23 EDT; 4s ago
  Process: 3247 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 3246 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 3246 (code=exited, status=1/FAILURE)

Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Failed to start The Apache HTTP Server.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.

journalctl -xn 输出:

-- Logs begin at Wed 2015-07-15 19:23:53 EDT, end at Wed 2015-07-15 19:25:23 EDT. --
Jul 15 19:25:11 devopsgroup.io-dev-redhat sshd[3196]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
Jul 15 19:25:17 devopsgroup.io-dev-redhat sudo[3221]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/su -l
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: (to root) vagrant on pts/0
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: pam_unix(su-l:session): session opened for user root by vagrant(uid=0)
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit httpd.service has begun starting up.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit httpd.service has failed.
-- 
-- The result is failed.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.

有什么想法吗?

【问题讨论】:

  • 尝试重启你的服务器,因为我也有同样的问题,但是重启我的服务器后,它工作正常

标签: apache centos


【解决方案1】:

这是由于 /etc/httpd/conf/httpd.conf 附加了超过 20 行 IncludeOptional sites-enabled/*.conf 的重复行

这是apachectl configtest 中的一个错误,因为它报告了正确的配置并且不提供可追踪的错误。

【讨论】:

  • 过去几个小时我一直在处理这个问题。 ? 谢谢!
猜你喜欢
  • 2017-06-23
  • 2018-09-16
  • 2016-11-12
  • 1970-01-01
  • 1970-01-01
  • 2016-05-31
  • 1970-01-01
  • 1970-01-01
  • 2020-07-12
相关资源
最近更新 更多