0

I'm trying to set up named but I'm in trouble trying to get it up. I'm using bind-9.9.4-29.el7_2.3.x86_64 on CentOS 7.2-1511 and that's what happens when I do systemctl start named:

[root@berlin ~]# systemctl start named
Job for named.service failed because the control process exited with error code. See "systemctl status named.service" and "journalctl -xe" for details.
[root@berlin ~]# journalctl -xe
-- Subject: Unit named-setup-rndc.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit named-setup-rndc.service has finished starting up.
-- 
-- The start-up result is done.
sep 01 12:35:56 berlin systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
-- Subject: Unit named.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit named.service has begun starting up.
sep 01 12:35:56 berlin bash[4808]: zone 184.132.10.IN-ADDR.ARPA/IN: loaded serial 2
sep 01 12:35:56 berlin bash[4808]: zone 7.237.10.IN-ADDR.ARPA/IN: loaded serial 2
sep 01 12:35:56 berlin bash[4808]: zone 1.168.192.IN-ADDR.ARPA/IN: loaded serial 3
sep 01 12:35:56 berlin bash[4808]: zone 1.1.10.IN-ADDR.ARPA/IN: loaded serial 6
sep 01 12:35:56 berlin bash[4808]: zone intra.genaker.net/IN: loaded serial 17
sep 01 12:35:56 berlin bash[4808]: zone localhost.localdomain/IN: loaded serial 0
sep 01 12:35:56 berlin bash[4808]: zone localhost/IN: loaded serial 0
sep 01 12:35:56 berlin bash[4808]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0
sep 01 12:35:56 berlin bash[4808]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: not loaded due to errors.
sep 01 12:35:56 berlin bash[4808]: _default/1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: bad zone
sep 01 12:35:56 berlin bash[4808]: zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address records (A or AAAA)
sep 01 12:35:56 berlin bash[4808]: zone 1.0.0.127.in-addr.arpa/IN: not loaded due to errors.
sep 01 12:35:56 berlin bash[4808]: _default/1.0.0.127.in-addr.arpa/IN: bad zone
sep 01 12:35:56 berlin bash[4808]: zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAAA)
sep 01 12:35:56 berlin bash[4808]: zone 0.in-addr.arpa/IN: not loaded due to errors.
sep 01 12:35:56 berlin bash[4808]: _default/0.in-addr.arpa/IN: bad zone
sep 01 12:35:56 berlin systemd[1]: named.service: control process exited, code=exited status=1
sep 01 12:35:56 berlin systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit named.service has failed.
-- 
-- The result is failed.
sep 01 12:35:56 berlin systemd[1]: Unit named.service entered failed state.
sep 01 12:35:56 berlin systemd[1]: named.service failed.
sep 01 12:35:56 berlin polkitd[4091]: Unregistered Authentication Agent for unix-process:4801:15030793 (system bus name :1.119, object path /org/freedesktop/PolicyKit1/Authenti

Then, if I do a named-checkconf, I get that:

[root@berlin ~]# named-checkconf -z /etc/named.conf
zone 184.132.10.IN-ADDR.ARPA/IN: loaded serial 2
zone 7.237.10.IN-ADDR.ARPA/IN: loaded serial 2
zone 1.168.192.IN-ADDR.ARPA/IN: loaded serial 3
zone 1.1.10.IN-ADDR.ARPA/IN: loaded serial 6
zone intra.genaker.net/IN: loaded serial 17
zone localhost.localdomain/IN: loaded serial 0
zone localhost/IN: loaded serial 0
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa' has no address records (A or AAAA)
zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: not loaded due to errors.
_default/1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: bad zone
zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address records (A or AAAA)
zone 1.0.0.127.in-addr.arpa/IN: not loaded due to errors.
_default/1.0.0.127.in-addr.arpa/IN: bad zone
zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAAA)
zone 0.in-addr.arpa/IN: not loaded due to errors.
_default/0.in-addr.arpa/IN: bad zone

Some help will be appreciated. Thanks.

Albert


Many thanks for your answer, Neil. This is my /etc/named.rfc1912.zones

[root@berlin etc]# cat named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package 
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
// 
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

zone "localhost.localdomain" IN {
    type master;
    file "named.localhost";
    allow-update { none; };
};

zone "localhost" IN {
    type master;
    file "named.localhost";
    allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
    type master;
    file "named.loopback";
    allow-update { none; };
};

zone "1.0.0.127.in-addr.arpa" IN {
    type master;
    file "named.loopback";
    allow-update { none; };
};

zone "0.in-addr.arpa" IN {
    type master;
    file "named.empty";
    allow-update { none; };
};

Please, tell me if you need the zone files inside /var/named. Thanks.

  • could you post your zone file as that would help troubleshoot this. – Neil Anuskiewicz Sep 1 '16 at 14:50
  • We need the reverse zone files, named.loopback and named.empty, as those are the ones whose contents named is complaining about. – Tilman Schmidt Sep 15 '16 at 9:48
2

Both journalctl and named-checkconf tell you why your named won't start:

_default/1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: bad zone
_default/1.0.0.127.in-addr.arpa/IN: bad zone
_default/0.in-addr.arpa/IN: bad zone

In other words: three of your reverse zone files are not written correctly.

They even tell you what BIND doesn't like about those zone files:

zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: NS '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa' has no address records (A or AAAA)
zone 1.0.0.127.in-addr.arpa/IN: NS '1.0.0.127.in-addr.arpa' has no address records (A or AAAA)
zone 0.in-addr.arpa/IN: NS '0.in-addr.arpa' has no address records (A or AAAA)

So it seems that you specified name servers for those zones without making sure that they actually exist, or perhaps made typos in those name server records so that they specify something else than what you intended.

Review those three zone files, paying special attention to the NS records. If you cannot find the error, post one or all of them so the community can have a look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.