Troubleshooting the `Failed to start Berkeley Internet Name Domain (DNS)` error message

If the Named service goes down we check its status with systemctl status named or journalctl -xe, however sometimes both commands do not contain any indication of specific zone causing the error:

systemctl status named.service
‚óŹ named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2018-08-14 16:02:25 PDT; 6s ago
Process: 20581 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
Aug 14 16:02:25 ns1.example.com bash[20581]: zone anotherexample.com/IN: loaded serial 1518288401
Aug 14 16:02:25 ns1.example.com systemd[1]: named.service: control process exited, code=exited status=1
Aug 14 16:02:25 ns1.example.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Aug 14 16:02:25 ns1.example.com systemd[1]: Unit named.service entered failed state.
Aug 14 16:02:25 ns1.example.com systemd[1]: named.service failed.

So in this kind of situations, we should instead run:

/usr/sbin/named-checkconf -z /etc/named.conf | grep "bad zone"

to get more detailed information on all DNS zones on the server and get rid of all inconsistencies in zone records until the `systemctl restart named` command comes positive.

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
To