• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue 99: Cannot assign requested address (OLD IP address)

Liew CheonFong

Basic Pleskian
I use Linode VPS. Nginx refuses to start after server restart.

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] bind() to 103.3.62.239:443 failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed

The 103.3.62.239 is my server's OLD IP address, which is no longer using. Now the server is a new IP address 139.162.x.x

Login Plesk panel has the follow error message:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] bind() to 103.3.62.239:443 failed (99: Cannot assign requested address) nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

# find /etc/ -iname "*" -type f -print0 | xargs -0 grep -H "103.3.62.239"
- Does NOT return any file with the IP address (only config files .bak that disabled)

# ip a | grep "103.3.62.239"
- return nothing

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

- Does not solve the issue

# 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 "103.362.239"
- Does not return any result.

# /sbin/ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:82:3b:10:14
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr f2:3c:91:2e:4f:79
inet addr:139.162.x.x Bcast:139.162.x.x Mask:255.255.255.0
inet6 addr: xxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:324070 errors:0 dropped:0 overruns:0 frame:0
TX packets:287235 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51266522 (51.2 MB) TX bytes:1247003887 (1.2 GB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12840 errors:0 dropped:0 overruns:0 frame:0
TX packets:12840 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1213621 (1.2 MB) TX bytes:1213621 (1.2 MB)


I tried the following solutions:


Remove nginx also removes the issue, but I need to have nginx server.

Help please? Thank you.
 
The 103.3.62.239 is my server's OLD IP address, which is no longer using. Now the server is a new IP address 139.162.x.x
Have you updated the interface IPs in Plesk when you changed the IP of the host system?
and
 
Have you updated the interface IPs in Plesk when you changed the IP of the host system?
and
I changed the IP address last year. The server was working fine until the data center recent maintenance and restarted the server.
No other IP address in Server Administration Panel > Tools & Settings > IP Addresses
 
It is only a backup file, right?
Should be.

There is one thing left to try:
Code:
strace nginx -t 2>&1 |less
or
Code:
strace nginx -t 2>&1 |grep ^open
This produces a lot of output as it lists all the syscalls nginx -t makes, but those include the calls to open all the configuration files nginx ingests. So you would be able to see whether there is a conf file that is not in the locations you grepped through.

(Oh, and BTW, you don't need the -iname "*" option to find, and you don't even need find as "grep -r" works just as well.)
 
Back
Top