Nginx does not start after IP change

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:41:53 UTC

Modified:

2017-02-17 10:20:19 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Nginx does not start after IP change

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 the server directly but was not removed from Plesk.

  • IP of the server was changed directly on the server. Plesk did not update the configuration automatically.

Resolution

  1. 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.

  2. You can use the following steps to repair the IP address:

    a. Access Tools & Settings > IP Addresses

    b. If there is an IP address marked with an exclamation point and a broken state, click the repair link, or remove this address from Plesk if it is not in use and does not exist on server.

    c. If there are no broken IP addresses, click re-read . Now these broken addresses should be revealed and repaired as per p.2.

  3. Now reconfigure the web-server:

    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
  4. Start nginx:

    # /etc/init.d/nginx restart
Have more questions? Submit a request
Please sign in to leave a comment.