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启动(重启)报错
  • 【解决方案】
    • 1、用systemctl status httpd.service查看,发现80端口被占用
    • 2、用netstat -antlp | grep 80查看端口被哪一服务占用
    • 3、关闭squid服务,再次启动,成功!

【问题】

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

http启动(重启)报错:Job for httpd.service failed because the control process exited with error code._第1张图片

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

netstat -antlp | grep 80

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

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

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

在这里插入图片描述

你可能感兴趣的:(故障排错,linux,http)