相关推荐recommended
Job for nginx.service failed because the control process exited with error code. See “systemctl stat
作者:mmseoamin日期:2024-01-18

【这个报错表示nginx的默认进程被占用】

第一步:systemctl status nginx查看nginx报错信息

Job for nginx.service failed because the control process exited with error code. See “systemctl stat,第1张

第二步:查看nginx配置文件,我这的nginx默认端口使用了3306

Job for nginx.service failed because the control process exited with error code. See “systemctl stat,第2张

第三步:使用netstat -tlnp查看目前的端口使用情况,发现mysql已经占用了3306端口,和我们nginx的默认端口冲突

Job for nginx.service failed because the control process exited with error code. See “systemctl stat,第3张

第四步:接着使用ps -ef | grep mysql 查看mysql的进程信息,使用kill -9强制杀死进程

Job for nginx.service failed because the control process exited with error code. See “systemctl stat,第4张

第五步:杀死后重启nginx进程,即可顺利开启,重启命令,systemctl restart nginx

Job for nginx.service failed because the control process exited with error code. See “systemctl stat,第5张