美文网首页
Nginx升级后启动错误

Nginx升级后启动错误

作者: 酱油诗人077 | 来源:发表于2019-11-17 21:44 被阅读0次

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

根据错误 提示 执行命令 : 

systemctl status nginx.service

然后 提示:

[root@VM_0_3_centos ~]# systemctl status nginx.service

● nginx.service - The nginx HTTP and reverse proxy server

  Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)

  Active: failed (Result: exit-code) since Sun 2019-11-17 21:04:28 CST; 16s ago

  Process: 17997 ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE) (重点在此)

  Process: 17994 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)

  Process: 17993 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)

Nov 17 21:04:27 VM_0_3_centos nginx[17997]: nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)

Nov 17 21:04:27 VM_0_3_centos nginx[17997]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

Nov 17 21:04:27 VM_0_3_centos nginx[17997]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)

Nov 17 21:04:27 VM_0_3_centos nginx[17997]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

Nov 17 21:04:27 VM_0_3_centos nginx[17997]: nginx: [emerg] bind() to [::]:443 failed (98: Address already in use)

Nov 17 21:04:28 VM_0_3_centos systemd[1]: nginx.service: control process exited, code=exited status=1

Nov 17 21:04:28 VM_0_3_centos nginx[17997]: nginx: [emerg] still could not bind()

Nov 17 21:04:28 VM_0_3_centos systemd[1]: Failed to start The nginx HTTP and reverse proxy server.

Nov 17 21:04:28 VM_0_3_centos systemd[1]: Unit nginx.service entered failed state.

Nov 17 21:04:28 VM_0_3_centos systemd[1]: nginx.service failed.

根据提示: ExecStart=/usr/sbin/nginx (code=exited, status=1/FAILURE) (重点在此)

执行:

/usr/sbin/nginx -c /etc/nginx/nginx.conf

ok 正常了。

重新启动:

systemctl start nginx

一切正常。 

相关文章

网友评论

      本文标题:Nginx升级后启动错误

      本文链接:https://www.haomeiwen.com/subject/iosmictx.html