Nginx restart command after installing a passenger

I just installed a passenger for nginx on my Ubuntu box (8.04). Now "sudo / etc / init.d / nginx restart" fails with the following errors:

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. 

I updated the configuration ..init.d / nginx to point to / opt / nginx after installing the passenger, so everything should be fine.

If I kill the process with sudo killall nginx and try to start nginx, it works fine, but restarting does not work.

+7
source share
2 answers

Just ignore

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

This is not an error, just a warning about 69.162.95.11 is not a public IP address

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

just restart Nginx, having solved this problem, if not, then do not check any ssl port in the settings. No ssl port should be 8081 after installation. maestro 2011-12-02 01:42:23 disconnect port 80 from apache or ltespeed and enable nginxcp as port 80

+1
source

In my case, it was that apache was already installed and it was using the port; so i just did:

 killall -9 apache2 

Perhaps this is different software in your case, you can use this command to check which ports are listening on the petitions.

 netstat -a | egrep 'Proto|LISTEN' 
+1
source

All Articles