Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy an...erver.

NGINX源码安装,第一次启动。报错
[root@test ~]# /etc/rc.d/init.d/nginx start
Starting nginx (via systemctl): Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.
[失败]
[root@test ~]# systemctl status nginx.service
● nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
Loaded: loaded (/etc/rc.d/init.d/nginx)
Active: failed (Result: exit-code) since 三 2019-07-24 11:10:54 CST; 41s ago
Docs: man:systemd-sysv-generator(8)
Process: 2977 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)

7月 24 11:10:52 test nginx[2977]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
7月 24 11:10:53 test nginx[2977]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
7月 24 11:10:53 test nginx[2977]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
7月 24 11:10:54 test nginx[2977]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
7月 24 11:10:54 test nginx[2977]: nginx: [emerg] still could not bind()
7月 24 11:10:54 test nginx[2977]: [失败]
7月 24 11:10:54 test systemd[1]: nginx.service: control process exited, code=exited status=1
7月 24 11:10:54 test systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy an…erver.
7月 24 11:10:54 test systemd[1]: Unit nginx.service entered failed state.
7月 24 11:10:54 test systemd[1]: nginx.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@test ~]# systemctl start nginx
Job for nginx.service failed because the control process exited with error code. See “systemctl status nginx.service” and “journalctl -xe” for details.
解决路程:
一直查
Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy an…erver.报错
https://www.cnblogs.com/taui/p/6197045.html
kill niginx进程,还是不行
后来,发现
nginx: [emerg] still could not bind()*
就查了下
https://blog.csdn.net/u013344860/article/details/83988584
尝试就解决啦
1、mount镜像
2、yum search netstat
3、查看80占用端口
4、杀死进程(kill -9 不行),我是用的killall httpd
5、可以启动啦

ps:操作
已安装:
net-tools.x86_64 0:2.0-0.17.20131004git.el7

完毕!
[root@test init.d]# netstat -ntlp | grep 80
tcp6 0 0 :::80 ::? LISTEN 1186/httpd
[root@test init.d]# kill -9 7043
-bash: kill: (7043) - 没有那个进程
[root@test init.d]# kill -9 1186
[root@test init.d]# netstat -ntlp | grep 80
tcp6 0 0 :::80 ::? LISTEN 1829/httpd
[root@test init.d]# kill -9 1829
[root@test init.d]# netstat -ntlp | grep 80
tcp6 0 0 :::80 ::? LISTEN 1830/httpd
[root@test init.d]# killall httpd
[root@test init.d]# netstat -ntlp | grep 80
[root@test init.d]# /etc/rc.d/init.d/nginx start
Starting nginx (via systemctl): [ 确定 ]

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值