Plesk

Unable to start or enable nginx as proxy on Plesk server: 99: Cannot assign requested address

Symptoms

Cause

The IP address from the error message was removed from the server but still present in Plesk database.

Resolution

  1. Connect to the server via SSH.

  2. Make sure that no domains are assigned to the IP address from the error message:

    Note: change the "203.0.113.2" IP address in the command below to the correct one based on the error message.

    # plesk db "SELECT DISTINCT d.name, GROUP_CONCAT(DISTINCT(IF(ip.public_ip_address IS NULL, ip.IP_Address, ip.public_ip_address)) SEPARATOR ', ') AS IPs FROM domains d JOIN DomainServices ds ON d.id=ds.dom_id JOIN IpAddressesCollections ipc USING(ipCollectionId) JOIN IP_Addresses ip ON ipc.ipAddressId=ip.id RIGHT JOIN Subscriptions s on s.object_id=d.id WHERE d.id IS NOT NULL GROUP BY d.name;" | grep "203.0.113.2"

    If any domains were returned during the command execution:

    | example.com | 203.0.113.2 |
    | example.org | 203.0.113.2 |

    change the IP address for these domains to the existing one.

  3. Make sure that the affected IP address does not exist on the server:

    Note: change the "203.0.113.2" IP address in the command below to the correct one based on the error message.

    # ip a | grep "203.0.113.2"

  4. Log in to Plesk.

  5. Go to Tools & Settings > IP Addresses and remove the affected IP address if it is still present there.

  6. Via the SSH, re-enable nginx:

    # plesk sbin nginxmng -d
    # plesk sbin nginxmng -e

Exit mobile version