【发布时间】:2011-06-18 03:32:57
【问题描述】:
我刚刚在我的 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,它可以正常工作,但重新启动不起作用。
【问题讨论】:
-
似乎其他服务正在使用端口 3000。您可以执行“ps auxwww|grep LISTEN|grep 3000”来查看正在使用该端口的进程。
标签: nginx passenger ubuntu-8.04