Apache服务在Linux Red Hat上的厨师食谱中不活跃
我有一个客户在服务器上有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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论