Applicable to:
- Plesk for Linux
Symptoms
Plesk IP address cannot be removed:
PLESK_ERROR: Error: Cannot remove the IP address 203.0.113.2 because it is the primary IP address of a network interface.
PLESK_ERROR: ifmng failed: cannot delete main IP on interface
Cause
Primary IP address of network interface cannot be removed by design.
Resolution
Note: This solution is applicable only if there are at least 2 IP addresses on a server. To add a new IP address, see this KB article.
-
Connect to a Plesk server via SSH.
-
Create a backup of Plesk database:
# plesk db dump psa > /root/psa_backup.sql
-
Connect to the Plesk database:
# plesk db
-
Modify the
IP_Addresses
table:Note: In the following example:
203.0.113.2 - the current main (primary) IP address
203.0.113.3 - the new main (primary) IP address that is going to replace 203.0.113.2-
Change the value of the main field to
true
for the new IP address:MYSQL_LIN: mysql> UPDATE IP_Addresses SET main='true' WHERE ip_address='203.0.113.3';
-
Change the value of the main field to
false
for the old IP address:MYSQL_LIN: mysql> UPDATE IP_Addresses SET main='false' WHERE ip_address='203.0.113.2';
-
Comments
5 comments
Getting Permission Denied as I enter plesk db dump psa > /root/psa_backup.sql
https://www.canva.com/design/DAE1BsT289M/PCtpMQbSj8ghSgvmul9b_g/view?utm_content=DAE1BsT289M&utm_campaign=designshare&utm_medium=link&utm_source=sharebutton
impossible to delete the address
Thank you, this worked for me.
Plesk on AWS EC2 came with 2 IP address one of them went awol after assigning Elastic IP. Then I added more Elastic IP addresses.
That awol IP address was set as the primary IP address on Plesk.
Rajeev Bagra Try Plesk-> Tools & Settings -> Tools & Resources -> SSH Terminal
After a restart, the settings unfortunately reset themselves.
I guess they are wrong somewhere in the network configuration from Server?
Please sign in to leave a comment.