httpd服务启动失败

httpd启动失败:

[root@localhost ~]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

查看服务状态:

[root@localhost ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─openstack-dashboard.conf
   Active: failed (Result: exit-code) since 三 2022-06-15 10:41:04 CST; 35s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 550 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
  Process: 456 ExecStartPre=/usr/bin/python2 /usr/share/openstack-dashboard/manage.py compress --force -v0 (code=exited, status=0/SUCCESS)
  Process: 435 ExecStartPre=/usr/bin/python2 /usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear -v0 (code=exited, status=0/SUCCESS)
 Main PID: 550 (code=exited, status=1/FAILURE)

6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.179501 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.179513 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.179519 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.179524 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.180855 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain httpd[550]: [Wed Jun 15 10:41:04.181436 2022] [so:w...ng
6月 15 10:41:04 localhost.localdomain systemd[1]: httpd.service: main process exited, cod...RE
6月 15 10:41:04 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
6月 15 10:41:04 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
6月 15 10:41:04 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

查看日志记录:

6月 15 10:42:48 localhost.localdomain 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.
6月 15 10:42:48 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
6月 15 10:42:48 localhost.localdomain systemd[1]: httpd.service failed.
6月 15 10:42:48 localhost.localdomain polkitd[666]: Unregistered Authentication Agent for unix-process:740:3719

[root@localhost ~]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit session-c216.scope has finished starting up.
-- 
-- The start-up result is done.
6月 15 10:43:01 localhost.localdomain sudo[848]: pam_unix(sudo:session): session opened for user root by (uid=0
6月 15 10:43:02 localhost.localdomain sudo[848]: pam_unix(sudo:session): session closed for user root
6月 15 10:43:02 localhost.localdomain sudo[858]:   cinder : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/cind
6月 15 10:43:02 localhost.localdomain systemd[1]: Started Session c217 of user root.
-- Subject: Unit session-c217.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit session-c217.scope has finished starting up.

解决方法:

# 关闭setsetenforce
# 临时关闭,重启失效
setenforce 0

# 永久生效
vi /etc/selinux/config
# 修改setenforce的值为disabled,保存退出
posted @ 2022-06-15 11:04  红雨520  阅读(3310)  评论(0编辑  收藏  举报