Articles in this section

Unable to remove IP address: IP address cannot be removed because it is used by DNS zone of one or more domains

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to delete an IP address from Plesk > Tools & Settings > IP Address:

    PLESK_ERROR: Error: IP address cannot be removed because it is used by DNS zone of one or more domains

  • The following commands show that the address is occupied by a DNS record of a domain hosted in Plesk:

    # plesk db
    <..>
    mysql> select * from dns_recs where val='203.0.113.2' or displayVal='203.0.113.2';

Cause

Database inconsistency - incorrect IP address is assigned to a DNS record.

Resolution

  1. Log in to Plesk.

  2. Go to Domains > example.com and check the actual IP assigned to the domain:
    ipaddress.png

  3. Go to Domains > example.com > DNS Settings and assign the actual IP address to all records:

For one record
  1. Click on the required record.
  2. Alter the IP address field.
  3. Submit the changes by pressing OK.
  4. Confirm the changes again with the Update button on the DNS Settings screen.
For all the records at once

Click on the Apply DNS Template button.

For all the incorrect records via CLI
  1. Connect to the server via SSH.

  2. Create Plesk database backup.

  3. Access Plesk database.

  4. Update incorrect records with the correct IP address:

    MYSQL_LIN: # UPDATE dns_recs SET displayVal = '10.39.91.111' WHERE displayVal = '203.0.113.2';

    MYSQL_LIN: UPDATE dns_recs SET val = '10.39.91.111' WHERE val = '203.0.113.2';

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.