Plesk

Nginx on Plesk server fails to start: 99: Cannot assign requested address

Symptoms

Cause

Unsynced IP address between Plesk and OS or IP address was removed/changed manually directly on the server.

Resolution

Sync IP addresses between Plesk and OS:

Solution for Plesk Obsidian 18.0.34 and earlier

  1. Log in to Plesk.

  2. Go to Tools & Settings > IP Addresses.

  3. Press the Reread IP button:

  4. If some IP addresses are marked as broken, either click on the Repair button to fix them or click on the Remove button if they are no longer required.

  5. Connect to the server via SSH.

  6. Re-enable nginx service:

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

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

    Note: This operation can cause a significant downtime when more than 100 domains are hosted on the Plesk server, as all the configuration files will be regenerated.

Solution via CLI for Plesk Obsidian 18.0.35 and later

  1. Connect to the server via SSH.

  2. Reread IPs in Plesk:

    # plesk bin ipmanage --reread

  3. Check IP addresses state:

    # plesk bin ipmanage -l
    State Type IP Clients Hosting PublicIP
    0 S enp0s5:203.0.113.2/255.255.0.0 0 0
    1 E enp0s5:203.0.113.3/255.255.255.255 0 1

    Note: State 0 means the IP address is ok, state 1 means the IP address is broken

  4. Repair broken IP addresses with state 1:

    # plesk bin ipmanage --repair 203.0.113.3

Solution via CLI for Plesk Obsidian 18.0.34 and earlier

  1. Connect to the server via SSH.

  2. Reread IPs in Plesk:

    # plesk bin ipmanage --reread

  3. Check IP addresses state:

    # plesk bin ipmanage -l
    State Type IP Clients Hosting PublicIP
    0 S enp0s5:203.0.113.2/255.255.0.0 0 0
    1 E enp0s5:203.0.113.3/255.255.255.255 0 1

    Note: State 0 means the IP address is ok, state 1 means the IP address is broken

  4. Repair broken IP addresses with state 1:

    # plesk bin ipmanage --repair 203.0.113.3


    If the IP address 203.0.113.3 is no longer required, remove it via the command below:

    # plesk bin ipmanage --remove 203.0.113.3

  5. Re-enable nginx service:

    # /usr/local/psa/admin/bin/nginxmng…