http启动(重启)报错:Job for httpd.service failed because the control process exited with error code.

Posted 王大雏

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了http启动(重启)报错:Job for httpd.service failed because the control process exited with error code.相关的知识,希望对你有一定的参考价值。

http启动(重启)报错:Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

【问题】

1、http启动(重启)报错

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.

在这里插入图片描述

【解决方案】

1、用systemctl status httpd.service查看,发现80端口被占用

systemctl status httpd.service

在这里插入图片描述

2、用netstat -antlp | grep 80查看端口被哪一服务占用

netstat -antlp | grep 80

在这里插入图片描述
由图看到是squid服务占用了80端口

3、关闭squid服务,再次启动,成功!

[root@web1 ~]# systemctl stop squid.service 
[root@web1 ~]# systemctl start httpd

在这里插入图片描述

以上是关于http启动(重启)报错:Job for httpd.service failed because the control process exited with error code.的主要内容,如果未能解决你的问题,请参考以下文章

Job for named.service failed 解决方法

在Linux上重启MySQL服务报错“Job for mysqld.service failed because the control process exited with error code“

Centos7 网络报错Job for iptables.service failed because the control process exited with error code.

mysql启动失败:Job for mysqld.service failed because..

Docker-docke服务启动报错:Job for docker.service failed because the control process exited with error code.

Nginx——Nginx启动报错Job for nginx.service failed because the control process exited with error code(代码片段