Job for httpd.service failed because the control process exited with error code.

说明  安装 Ambari + HDP (CentOS 8 , 阿里云服务器), 制作了 本地的 yum 源 ,安装 httpd 后 启动报错

Job for httpd.service failed because the control process exited with error code.see “systemctl status httpd.service” and “journalctl -xe” for details.

这个提醒 会让你去查看当前状态日志,查看状态日志时基本上你会发现 一些服务处在 fail 状态 基本上就是httpd服务没能够起来

这里提供一些解决方案:

解决方法:这是一个很常见的错误,有两个可能原因


1.杀掉这个进程就可以:


先ps –aux | grep http
第二行数字就是进程pid号
Kill -9 pid号 即可杀掉进程
杀完之后 重启reboot 再ps –aux | grep http 确保httpd进程被杀掉 若发现无法杀掉进程 往下看

2. 如果杀掉进程的话,重启进程还存在,就代表成了僵尸进程,就重新安装哈httpd

步骤如下:
先用yum卸载httpd和mod_wsgi,
命令:yum remove httpd mod_wsgi;
然后再安装yun -y install httpd mod_wsgi 就可以了
安装完成后 service httpd restart 即可 问题基本排除

 

Job for httpd.service failed because the control process exited with error code.