Apache服务在Linux Red Hat上的厨师食谱中不活跃

发布于 2025-02-13 13:58:09 字数 1363 浏览 0 评论 0原文

我有一个客户在服务器上有500个网站的客户,我正在尝试自动化它。有时,当他想在服务器上部署配置时,apache也不会启动语法,因为我在服务器的新启动之前对其进行了检查。 这是执行配方的工作流程:

  • 停止服务器
  • 下载配置
  • 复制配置(所有500)
  • 检查error_log(apachectl configTest)
  • (如果语法OK)启动服务器

,问题开始于此,因为我的启动服务器的服务不活动。

Executing /bin/systemctl is-active httpd
 ---- Begin output of /bin/systemctl is-active httpd ----
 DEBUG: STDOUT: inactive
DEBUG: STDERR: 
 ---- End output of /bin/systemctl is-active httpd ----
DEBUG: Ran /bin/systemctl is-active httpd returned 3
DEBUG: Executing /bin/systemctl is-enabled httpd
DEBUG: ---- Begin output of /bin/systemctl is-enabled httpd ----
DEBUG: STDOUT: enabled
DEBUG: STDERR: 
DEBUG: ---- End output of /bin/systemctl is-enabled httpd ----
DEBUG: Ran /bin/systemctl is-enabled httpd returned 0
DEBUG: Executing /bin/systemctl start httpd
DEBUG: ---- Begin output of /bin/systemctl start httpd ----
DEBUG: STDOUT: 
DEBUG: STDERR: Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
DEBUG: ---- End output of /bin/systemctl start httpd ----
DEBUG: Ran /bin/systemctl start httpd returned 1

也许有人知道如何再次激活服务?

service 'httpd' do
  supports :status => true
  action :start
  ignore_failure true
end

我强调这并不是每次都在发生。

I have a customer who has 500 web sites on server, and I am trying to automate it. Sometimes when he wants to deploy configurations on the server Apache wont start even Syntax is Ok, because I'm checking it before new start of the server.
This is workflow of execution recipes:

  • Stop the server
  • Download configurations
  • Copy configurations(all 500)
  • Check error_log(apachectl configtest)
  • (if Syntax Ok) Start the server

and the problem starts here because my service for start the server is inactive.

Executing /bin/systemctl is-active httpd
 ---- Begin output of /bin/systemctl is-active httpd ----
 DEBUG: STDOUT: inactive
DEBUG: STDERR: 
 ---- End output of /bin/systemctl is-active httpd ----
DEBUG: Ran /bin/systemctl is-active httpd returned 3
DEBUG: Executing /bin/systemctl is-enabled httpd
DEBUG: ---- Begin output of /bin/systemctl is-enabled httpd ----
DEBUG: STDOUT: enabled
DEBUG: STDERR: 
DEBUG: ---- End output of /bin/systemctl is-enabled httpd ----
DEBUG: Ran /bin/systemctl is-enabled httpd returned 0
DEBUG: Executing /bin/systemctl start httpd
DEBUG: ---- Begin output of /bin/systemctl start httpd ----
DEBUG: STDOUT: 
DEBUG: STDERR: Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
DEBUG: ---- End output of /bin/systemctl start httpd ----
DEBUG: Ran /bin/systemctl start httpd returned 1

Maybe someone knows how to activate service again?

service 'httpd' do
  supports :status => true
  action :start
  ignore_failure true
end

I emphasize this is not happening every time.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文