7

我刚刚在我的 Ubuntu (8.04) 机器上安装了 Nginx 的乘客。现在“sudo /etc/init.d/nginx restart”失败并出现以下错误:

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

我在安装乘客后更新了 ..init.d/nginx 配置以指向 /opt/nginx,所以应该没问题。

如果我用“sudo killall nginx”终止进程并尝试启动 nginx,它工作正常,但重启不起作用。

4

2 回答 2

1

在我的情况下,Apache 已经安装并且正在使用该端口;所以我只是做了:

killall -9 apache2

也许在你的情况下是另一个软件,你可以使用这个命令来检查哪些端口正在监听请求

netstat -a | egrep 'Proto|LISTEN'
于 2012-03-14T00:23:41.993 回答
1

直接无视(好了

nginx: [warn] conflicting server name "69.162.95.11" on 69.162.95.11:80, ignored

这不是错误,只是警告 69.162.95.11 is not shared IP 关于

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

如果没有,只需重新启动 Nginx 即可解决此问题,然后在调整设置下检查无 ssl 端口。安装后无 ssl 端口应为 8081。大师 02-12-2011, 01:42 AM 从 apache 或 ltespeed 关闭端口 80 并打开 nginxcp 作为端口 80

于 2011-04-21T08:56:27.170 回答