Plesk

Cannot start BIND or run plesk repair dns on Plesk server: has no address records

Symptoms

Cause

Inconsistency in Plesk database with invalid DNS zones from inexistent domains causes problems in DNS service.

Resolution

  1. Connect to the server via SSH

  2. Back up Plesk database:

    # plesk db dump psa > psa.backup.sql

  3. Remove orphaned records:

    # plesk db "delete from dns_zone where id not in (select dns_zone_id from domains) and id not in (select dns_zone_id from domain_aliases) and id not in (select val from misc where param = 'default_dns_zone_id')"

    # plesk db "delete from dns_recs where dns_zone_id not in (select dns_zone_id from domains) and dns_zone_id not in (select dns_zone_id from domain_aliases) and dns_zone_id not in (select val from misc where param = 'default_dns_zone_id')"

  4. Backup /etc/named.conf file:

    # cp -a /etc/named.conf{,.backup}

  5. Remove all configuration related to example.com from /etc/named.conf file. The configuration that needs to be removed looks like follows:

    zone "example.com" {
    type master;
    file "example.com";
    allow-transfer {
    203.0.113.2;
    common-allow-transfer;
    };
    };

  6. Move example.com DNS zone from /var/named/chroot/var directory:

    # mv /var/named/chroot/var/example.com /root/example.com

  7. Restart bind:

    # service named-chroot restart

  8. Repair DNS zones:

    # plesk repair dns -y

Exit mobile version