Unable to start Bind: bad zone or has no address records errors

Refers to:

  • Plesk for Linux

Created:

2016-11-16 12:43:30 UTC

Modified:

2017-01-27 17:41:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to start Bind: bad zone or has no address records errors

Symptoms

  1. The "named" service fails to start:

    # /etc/init.d/psa startall
    Starting psa... done
    Starting xinetd service... done
    Starting named service... failed
    Starting mysqld service... failed
    Starting postgresql service... not installed
    Starting psa-spamassassin service... done
    Plesk: Starting Mail Server... done
    # /etc/init.d/psa reload
    Reloading SWsoft control panels server... [ OK ]
    # /etc/init.d/named reload
    Reloading named: [FAILED]
  2. Log output includes:

    # tail /var/log/messages
    ...
    serv1 named: zone example.com/IN: not loaded due to errors.
    serv1 named: _default/example.com/IN: bad zone
    serv1 named: zone example.com/IN: NS 'ns.example.com' has no address records (A or AAAA)
    serv1 sw-cp-server_init: stale pidfile.
  3. Some domain DNS zones are not loaded:

    # /etc/init.d/named restart | grep -v 'loaded serial'
    Stopping named: [ OK ]
    Starting named:
    Error in named configuration:
    zone example.com/IN: NS 'ns.example.com' has no address records (A or AAAA)
    zone example.com/IN: not loaded due to errors.
    _default/example.com/IN: bad zone

Additional symptoms

dns_master_load: example.com:22: www.example.com: CNAME and other data
zone example.com/IN: loading master file example.com: CNAME and other data

Cause

The cause may be a corrupted Bind configuration. Some DNS records are missing in the domain DNS zone.

Resolution

  1. Back up and rebuild the DNS configuration with the following commands:
    cd /var/named/run-root/etc
    mv named.conf named.conf.bak
    cp named.conf.default named.conf
    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -Ns -e"SELECT name FROM dns_zone" | \\
    while read dz ; do /usr/local/psa/admin/sbin/dnsmng --update $dz ; done
    /etc/init.d/named restart

Note : The path to the DNS server's chrooted directory may vary depending on your operating system distribution. If a directory named /var/named/run-root/etc does not exist, try /var/named/chroot/etc.

  1. If the following error still occurs after rebuilding:
    'ns.example.com' has no address records (A or AAAA)

    check the domain DNS zone in Plesk > Subscriptions > example.com >DNS settings .
    Make sure that an A record exists for NS server. If it is absent, please create it.

Have more questions? Submit a request
Please sign in to leave a comment.