nginx启动失败之nginx进程占用80端口

1.nginx默认监听80端口,在首次启动过程中莫名其妙启动失败
详情如下:
Jul 04 12:17:21 nginx-test nginx[26479]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 04 12:17:21 nginx-test nginx[26479]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 04 12:17:22 nginx-test nginx[26479]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 04 12:17:22 nginx-test nginx[26479]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 04 12:17:23 nginx-test nginx[26479]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Jul 04 12:17:23 nginx-test nginx[26479]: nginx: [emerg] still could not bind()
2.实际上只有nginx在使用80端口,不应该存在占用情况
[root@nginx-test yum.repos.d]# ss -tunlp
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 :68 : users:((“dhclient”,pid=2789,fd=6))
udp UNCONN 0 0 127.0.0.1:323 : users:((“chronyd”,pid=2054,fd=1))
udp UNCONN 0 0 ::1:323 :::
users:((“chronyd”,pid=2054,fd=2))
tcp LISTEN 0 128 *:80 : users:((“nginx”,pid=16727,fd=6),(“nginx”,pid=16726,fd=6))
tcp LISTEN 0 128 *:22 : users:((“sshd”,pid=3176,fd=3))

3.反正被占用了,也不知为何?先恢复服务,后续持续跟踪
[root@nginx-test ~]# ps -ef |grep nginx
root 16726 1 0 12:11 ? 00:00:00 nginx: master process nginx
nginx 16727 16726 0 12:11 ? 00:00:00 nginx: worker process
root 26437 16630 0 12:16 pts/1 00:00:00 vim /var/log/nginx/error.log
root 26488 26438 0 12:18 pts/2 00:00:00 grep --color=auto nginx

[root@nginx-test ~]# kill -9 16727 16726

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值