nginx重启 failed (98: Address already in use)

nginx 启动报错:Job for nginx.service failed because the control process exited with error code

https://blog.csdn.net/a1007720052/article/details/82255226

根据提示输入命令:

systemctl status nginx.service

端口被占用,没仔细看,卸载,重装……还是不行。

然后……

 

https://blog.csdn.net/zqinghai/article/details/73484394

 

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zqinghai/article/details/73484394
centos6.5,启动nginx服务,无法开启,导致网页打不开。把服务从起一下发现提示错误如下:

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

问题描述:地址已被使用。可能nginx服务卡死了,导致端口占用,出现此错误。


查看端口

netstat -ntpl

[root@localhost /]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:58819               0.0.0.0:*                   LISTEN      2094/rpc.statd      
tcp        0      0 127.0.0.1:3306              0.0.0.0:*                   LISTEN      5060/mysqld         
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      2294/vsftpd         
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      2271/sshd           
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2121/cupsd          
tcp        0      0 :::23527                    :::*                        LISTEN      2094/rpc.statd      
tcp        0      0 :::80                       :::*                        LISTEN      2347/httpd          
tcp        0      0 :::22                       :::*                        LISTEN      2271/sshd           
tcp        0      0 ::1:631                     :::*                        LISTEN      2121/cupsd 

kill 2347

[root@localhost /]# service nginx start
Starting nginx:                                            [  OK  ]
[root@localhost /]# ps -ef|grep nginx
root      2816     1  0 11:03 ?        00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody    2817  2816  0 11:03 ?        00:00:00 nginx: worker process                                          
nobody    2818  2816  0 11:03 ?        00:00:00 nginx: worker process                                          
nobody    2819  2816  0 11:03 ?        00:00:00 nginx: worker process                                          
nobody    2820  2816  0 11:03 ?        00:00:00 nginx: worker process                                          
root      2823  2732  0 11:03 pts/0    00:00:00 grep nginx

--------------------- 
版权声明:本文为CSDN博主「zqinghai」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/zqinghai/article/details/73484394

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值