如何从 systemd 发行版中的 httpd 获取详细的错误消息?

发布于 2024-12-28 16:35:38 字数 679 浏览 0 评论 0原文

Fedora 更改为 systemd,因此现在当我尝试启动 httpd 时,我收到错误消息

[]$ systemctl restart httpd.service
Job failed. See system logs and 'systemctl status' for details.

当我查看 /var/log/httpd/error_log 时,我没有看到任何启动错误消息。 当我查看 /var/log/messages 时,我没有看到任何启动错误消息。他们在哪里?我需要启用一个选项吗?

忘记添加以下命令响应

[]$ systemctl status httpd.service
httpd.service - LSB: start and stop Apache HTTP Server
      Loaded: loaded (/etc/rc.d/init.d/httpd)
      Active: failed since Tue, 24 Jan 2012 23:32:37 +0000; 8min ago
     Process: 1061 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/httpd.service

Fedora changed to systemd so now when I try to start httpd I get the error message

[]$ systemctl restart httpd.service
Job failed. See system logs and 'systemctl status' for details.

When I look in /var/log/httpd/error_log I do not see any startup error messages.
When I look in /var/log/messages I do not see any startup error messages. Where are they? Do I need to enable an option?

Forgot to add the following command response

[]$ systemctl status httpd.service
httpd.service - LSB: start and stop Apache HTTP Server
      Loaded: loaded (/etc/rc.d/init.d/httpd)
      Active: failed since Tue, 24 Jan 2012 23:32:37 +0000; 8min ago
     Process: 1061 ExecStart=/etc/rc.d/init.d/httpd start (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/httpd.service

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

束缚m 2025-01-04 16:35:38

默认情况下,写入标准输出或标准错误的任何内容都应该发送到 /var/log/messages - 这是从 F16 开始的标准 systemd 行为。

对于httpd,大多数错误也可能在发送到控制台的同时发送到/var/log/httpd/error_log

如果您仍然使用 F15,那么事情会更棘手,您可能必须避开 systemd 才能看到发送到控制台的任何内容,因为它不会捕获日志的输出。在您的环境中设置SYSTEMCTL_SKIP_REDIRECT,并使用/etc/init.d/httpd start启动httpd来查看它们。

Anything that was written to standard output or standard error should have been sent to /var/log/messages by default - that is standard systemd behaviour from F16 on.

With httpd most errors are also likely to have been sent to /var/log/httpd/error_log at the same time that they were sent to the console.

If you're still on F15 then things are trickier, and you will probably have to dodge systemd to see anything that was sent to the console as it doesn't capture the output to the log. Set SYSTEMCTL_SKIP_REDIRECT in your environment and start httpd with /etc/init.d/httpd start to see them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文