Error occured. Failed to connect to port 80: Connection refused | Nginx does not start after IP change
Nginx does not start after IP change
APPLIES TO:
- Plesk 12.0 for Linux
- Plesk 11.0 for Linux
- Plesk 11.5 for Linux
Symptoms
- On the Plesk homepage, you see the following error:
- New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] bind() to 10.9.23.65:80 failed (99: Cannot assign requested address) nginx: configuration file /etc/nginx/nginx.conf test failed . The error message containing the detailed error descriptions was sent to you by e-mail. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
- Nginx cannot start:
[emerg] bind() to 10.9.23.65:80 failed (99: Cannot assign requested address) ;
Cause
- IP was removed from server directly but was not removed from Plesk
- IP of the server was changed directly on the server. Plesk do not update configuration automatically.
Resolution
- Sync Plesk database and IP addresses on the server:
# /usr/local/psa/bin/reconfigurator --autoconfigure
Please pay attention to the output of the first command. It may contain the same IP address listed in several sections and also some IP addresses listed under ‘`Database`’ but not listed under `’Actual’`:
[root@srv ~]# /usr/local/psa/bin/reconfigurator –autoconfigure
Database: [<1.2.3.4>, <5.6.7.8>, <9.1.2.2>, <8.1.2.3>, <7.1.2.3>, <6.1.2.3>, <0000:a0a0:0000:a0:225:00a0:0a00:0a00]
Actual: <1.2.3.4>, <5.6.7.8>, <9.1.2.2>, <8.1.2.3>, <7.1.2.3>, <6.1.2.3>]
Removed IPs: [] [<0000:a0a0:0000:a0:225:00a0:0a00:0a00>]
Added IPs: [] []
Mapping: {}
Old not remapped: [<0000:a0a0:0000:a0:225:00a0:0a00:0a00>]
New not used: []The above case indicates that Ipv6 address
0000:a0a0:0000:a0:225:00a0:0a00:0a00
was removed directly from the server interface. - You can use the following steps to repair the IP address:a. Access Tools & Settings > IP Addressesb. If there is an IP address marked with an exclamation point and a broken state, click the repair link.
c. If there are no broken IP addresses, click re-read. Now, these broken addresses should be revealed and repaired as per p.2
- Now reconfigure web-server:
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
- Start nginx:
# /etc/init.d/nginx restart
Kaynak : http://kb.odin.com/en/114245