Nginx Error bind() to [::]:80 failed (98: Address already in use)

Site is being load balanced and you get this error is different locations:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

This is using apache vs Nginx.

Restart nginx fails:

root@web2:/var/log/nginx# tail -f error.log
2015/09/11 01:00:13 [emerg] 5190#5190: bind() to [::]:80 failed (98: Address already in use)
2015/09/11 01:00:13 [emerg] 5190#5190: bind() to 0.0.0.0:80 failed (98: Address already in use)

Then it means nginx or some other process is already using port 80.

You can kill it using:


# sudo fuser -k 80/tcp

And then try restarting nginx again:


# service nginx start

502 Errors on Plesk

Getting 502 Errors on plesk

Try and disable nginx and re-configure your apache configuration to see if it will correct the errors nginx is showing.

To disable nginx, issue :


# /usr/local/psa/admin/bin/nginxmng -d

To reconfigure your apache configuration issue :


# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

nginx: [emerg] bind() to 68.xx.xx.xx:443 failed (99: Cannot assign requested address)

Apache is listening on port 7080. This usually means the server is running nginx on port 80 and forwarding script calls to apache. Restarting nginx and received the following error:

Starting nginx: nginx: [emerg] bind() to 68.xx.xx.xx:443 failed (99: Cannot assign requested address)

Run the following command to disable nginx and rebuild the apache configuration to use port 80:


# /usr/local/psa/admin/bin/nginxmng -d

You can enable nginx again if needed by running:


# /usr/local/psa/admin/bin/nginxmng -e

Nginx error

nginx: [emerg] bind() to 68.168.98.181:443 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed

You can disable nginx which should force the configuration to rebuild:

/usr/local/psa/admin/bin/nginxmgr -d

You can also try the steps below:

http://kb.sp.parallels.com/en/114245

If you get the error:

Apache config (14180811290.93120100) generation failed: Template_Exception: nginx: [emerg] bind() to 68.168.98.181:80 failed (99: Cannot assign requested address)

Re-read the IP’s in plesk. Then try again.