大网数据广告活动
服务器运维问答

Why does apache fail to start and only say "Configuration Failed" in error log?

· 52CE 我爱测

Apache 2.2.23 fails to start for me, and the only entries in the log file are: [Fri Feb 22 02:54:24 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Fri Feb 22 02:54:24 2013] [notice] Digest: generating secret…

问题原文

原帖链接 · Mike Venzke · CC BY-SA 3.0

Apache 2.2.23 fails to start for me, and the only entries in the log file are:

[Fri Feb 22 02:54:24 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Feb 22 02:54:24 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Feb 22 02:54:24 2013] [notice] Digest: done
Configuration Failed
[Fri Feb 22 02:54:57 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Feb 22 02:54:57 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Feb 22 02:54:57 2013] [notice] Digest: done
Configuration Failed

This has been driving me crazy. The network is fine, the disks are fine, the config files pass syntax checks, nothing has been changed since it previously worked. It just refuses to start, usually after some load spike.

I'd also mention that the restart mechanism includes doing kill -9 if graceful shutdown doesn't succeed.

I can't find anything on google or here about this.

已采纳解答

原帖链接 · Mike Venzke · CC BY-SA 3.0

I finally found the solution to this, by removing all site configs, modules, and config directives.

Then, finally, the error log produced this gem:

[Fri Feb 22 03:04:22 2013] [emerg] (28)No space left on device: Couldn't create accept lock (/etc/httpd/logs/accept.lock.10752) (5)
[Fri Feb 22 03:04:24 2013] [warn] pid file /etc/httpd/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

Now this, there were answers for on google. As mentioned here and other places, this error was caused by too many open semaphores from apache, as the disk was empty and writeable.

I solved this by running:

ipcs -s | grep www-data | awk '{print $2;}' | while read -r line; do ipcrm sem "$line"; done

and adding that to the restart script. Now, everything is fine. I assume there's a correlation between this and using kill -9, but without that I'm left with hung, unresponsive apache processes.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-02-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。