Question: nginx fails to start on the Plesk server: 99: Cannot assign requested address
Applicable to:Symptoms
- When opening a website in a web browser, either Webserver Default page or the following error is shown:
Unable to connect- The following error message is shown on the Home page in Plesk:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] bind() to 203.0.113.2:443 failed (99: Cannot assign requested address) nginx: configuration file /etc/nginx/nginx.conf test failed.
- nginx service fails to start with the error:
nginx: [emerg] bind() to 203.0.113.2:443 failed (99: Cannot assign requested address)- Execution of plesk repair web command finishes with the warning:
# plesk repair web
...
One or more IP addresses registered in Plesk (203.0.113.2) are missing from the server's network interfaces. Domains assigned these IP addresses (example.com) are unreachable. Assign valid IP addresses to these domains and rebuild the server configuration files........................... [WARNING]
- The IP address from the warning message (203.0.113.2 in this example) is marked as broken in Plesk at Tools & Settings > IP Addresses.
- This IP address does not exist on the system in Plesk: the following command does not list it:
# ip a | grep '203.0.113.2'
CauseThe IP address that exists in Plesk does not exist on the server.
ResolutionApply one of the following solutions:
Solution I:Add the missing IP address 203.0.113.2 to the server.
To do this, go to Tools & Settings > IP Addresses and click Repair next to the broken IP address.
Solution II:If the address is no longer needed, remove it from Plesk:
1.Switch the domains from the missing IP address to the new one using the instructions from this KB article (section "Changing the IP address for all domains assigned to a specific IP address").
2.Log in to Plesk.
3.Go to Tools & Settings > IP Addresses and click Reread.
4.Select the broken IP address and click Remove.
5.Connect to the Plesk server via SSH.
6.Repair web server configuration:
# plesk repair web -y