Nginx重启时提示"nginx: [emerg] bind() to 0.0.0.0"解决方法

[复制链接] |主动推送
查看33 | 回复0 | 2024-9-11 17:59:22 | 显示全部楼层 |阅读模式
昨天下午蓝速云在一台服务器中折腾迁移数据问题的时候,重启Nginx的时候有发现"Starting nginx... nginx: [emerg] bind() to 0.0.0.0:888 failed (98: Address already in use)"这样的报错问题。
Starting nginx... nginx: [emerg] bind() to 0.0.0.0:888 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:888 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:888 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:888 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:888 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()
failed


估摸着是在操作的时候忘记关闭Nginx导致启动冲突,这里要禁止掉端。
sudo fuser -k 80/tcp
最后我们再重启Nginx后显示正常:
/etc/init.d/nginx restart
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则