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

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

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

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

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

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

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

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

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

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

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

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

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/e680ae666b.html