[openSUSE 12.1][BIND 9.8.3-P4 -4] won't start at boot

Greetings !!

I experienced strange behavior from named daemon that won’t start in runlevel 3 and 5 even if chkconfig -l shows this service must be started at those runlevels.

using /etc/init.d/named restart or start failed.

Now I launched named -4 and it seems it is working (the reverse resolution won’t but it is just a configuration problem) but I did it manually, I want the server to launch the DNS service at boot (in case of).

It is said in /var/log/messages

Dec  3 13:15:18 serveur named[15226]: /etc/named.conf:21: parsing failed
Dec  3 13:15:18 serveur named[15226]: ..skipped

at line 21 I have directory “/var/lib/named”;

When using named -4 manually:

Dec  3 13:19:40 serveur named[15646]: the working directory is not writable
Dec  3 13:19:40 serveur named[15646]: zone 0.0.127.in-addr.arpa/IN: loaded serial 42
Dec  3 13:19:40 serveur named[15646]: zone 1.168.192.in-addr.arpa/IN: NS '169.1.168.192.in-addr.arpa' has no address records
Dec  3 13:19:40 serveur named[15646]: zone 1.168.192.in-addr.arpa/IN: not loaded due to errors.
Dec  3 13:19:40 serveur named[15646]: zone 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: loaded
Dec  3 13:19:40 serveur named[15646]: zone cssm.college/IN: loaded serial 2012113001
Dec  3 13:19:40 serveur named[15646]: zone localhost/IN: loaded serial 42  
Dec  3 13:19:40 serveur named[15646]: managed-keys-zone ./IN: loaded serial 0
Dec  3 13:19:40 serveur named[15646]: running

I configured the 1.168.192.in-addr.arpa file as I always did:

1.168.192.in-addr.arpa. IN NS           cssm.college.
169             IN PTR          serveur.cssm.college.

The resolution itself works but the reverse won’t and the service won’t start at boot.
I’ll check with yast and then I’ll come back.

On 2012-12-03 13:36, soundlord wrote:
>
> Greetings !!
>
> I experienced strange behavior from named daemon that won’t start in
> runlevel 3 and 5 even if chkconfig -l shows this service must be started
> at those runlevels.

Your named does not start because you have an error on its
configuration, as shows this message:

> Code:
> --------------------
> Dec 3 13:15:18 serveur named[15226]: /etc/named.conf:21: parsing failed
> Dec 3 13:15:18 serveur named[15226]: …skipped
>
> --------------------

Post that file without comments.


cat /etc/named.conf | egrep -v "^:space:]]*$|^#"


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Just a thought…
To make troubleshooting easier…

  • Recommend starting the BIND service with its default setup without custom records. Although this can be done manually, is probably best done by simply going into YAST > System Runlevels. Find your BIND service, then using the Advanced view enable the service, set to startup on Boot and if you wish start the service immediately.

  • Only after configuring the service to run as you wish, then use the DNS applet in YAST to configure your zone records. Should prevent most formatting and incomplete/incorrect records.

“Old School” manual edits can be faster but more prone to problems. Manual still better for large scale operations like copying large amounts of zones and records, but using the GUI can be better for individual records.

HTH,
TSU

On 12/5/2012 10:46 AM, tsu2 wrote:
>
> Just a thought…
> To make troubleshooting easier…
>
> - Recommend starting the BIND service with its default setup without
> custom records. Although this can be done manually, is probably best
> done by simply going into YAST > System Runlevels. Find your BIND
> service, then using the Advanced view enable the service, set to startup
> on Boot and if you wish start the service immediately.
>
> - Only after configuring the service to run as you wish, then use the
> DNS applet in YAST to configure your zone records. Should prevent most
> formatting and incomplete/incorrect records.
>
> “Old School” manual edits can be faster but more prone to problems.
> Manual still better for large scale operations like copying large
> amounts of zones and records, but using the GUI can be better for
> individual records.
>
> HTH,
> TSU
>
>
soundlord;

BIND provides two tools to check the syntax of named.conf and zone files:


named-checkconf
named-checkzone <path to zone file>

By default named-checkconf defaults to /etc/named.conf; named-checkzone needs
the path to your zone file. If there are no errors the tools return nothing!
Neither tool checks semantics only syntax.

There is more information and examles for Opensuse’s implementation of BIND
located here:
/usr/share/doc/packages/bind


P.V.
“We’re all in this together, I’m pulling for you” Red Green

cat /etc/named.conf | egrep -v “^:space:]]*$|^#”

options {
        # The directory statement defines the name server's working directory
        directory "/var/lib/named";
        managed-keys-directory "/var/lib/named/dyn/";
        # Write dump and statistics file to the log subdirectory.  The
        # pathenames are relative to the chroot jail.
        dump-file "/var/log/named_dump.db";
        statistics-file "/var/log/named.stats";
        # The forwarders record contains a list of servers to which queries
        # should be forwarded.  Enable this line and modify the IP address to
        # your provider's name server.  Up to three servers may be listed.
        #forwarders { 192.0.2.1; 192.0.2.2; };
        # Enable the next entry to prefer usage of the name server declared in
        # the forwarders section.
        #forward first;
        # The listen-on record contains a list of local network interfaces to
        # listen on.  Optionally the port can be specified.  Default is to
        # listen on all interfaces found on your system.  The default port is
        # 53.
        #listen-on port 53 { 127.0.0.1; };
        # The listen-on-v6 record enables or disables listening on IPv6
        # interfaces.  Allowed values are 'any' and 'none' or a list of
        # addresses.
        listen-on-v6 { any; };
        # The next three statements may be needed if a firewall stands between
        # the local server and the internet.
        #query-source address * port 53;
        #transfer-source * port 53;
        #notify-source * port 53;
        # The allow-query record contains a list of networks or IP addresses
        # to accept and deny queries from. The default is to allow queries
        # from all hosts.
        #allow-query { 127.0.0.1; };
        # If notify is set to yes (default), notify messages are sent to other
        # name servers when the the zone data is changed.  Instead of setting
        # a global 'notify' statement in the 'options' section, a separate
        # 'notify' can be added to each zone definition.
        notify no;
        disable-empty-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";
        include "/etc/named.d/forwarders.conf";
};
zone "." in {
        type hint;
        file "root.hint";
};
zone "localhost" in {
        type master;
        file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
        type master;
        file "127.0.0.zone";
};
zone "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 "127.0.0.zone";
};
include "/etc/named.conf.include";
zone "cssm.college" in {
        file "master/cssm.college";
        type master;
        allow-transfer { any; };
};
zone "1.168.192.in-addr.arpa" in {
        allow-transfer { any; };
        file "master/1.168.192.in-addr.arpaX";
        type master;
};
logging {
        category queries { log_syslog; };
        category default { log_syslog; };
        channel log_syslog { syslog; };
};

Now I can do name resolution in every way (in reverse dns too).
The only thing is that ever if I set run levels (3,5) correctly the service won’t start at boot, I have to do it “manually” with a script… that’s uncomfortable… I never had issues with bind/named to be started up at boot.

I did not wrote it but named-checkconf was used but displayed nothing helpful…

I know that there is a parsing error but I also know there is two named.conf that are strictly identical in /etc/ and /var/lib/named/etc…

The message log displayed information I missed to precise in my last post:

Starting name server BIND /etc/named.conf:21: change directory to '/var/lib/named' failed: file not found

/var/lib/named/ indeed exists… I modified on both files in /etc and /var/lib/named/etc/ to /var/lib/named/ with the ending /
it changed nothing there is no way to do /etc/init.d/named start|restart without having a parsing error in line 21…

If I were to guess,

You didn’t follow my suggested setup sequence.

There is rhyme and reason to my suggestion, it’s always more efficient, reliable and time saving to setup a working default before custom modification. If you don’t establish a fully functional base first, you can spend a lot of time chasing down problems and anomalies can pop up unexpectedly.

TSU

On 2012-12-13 10:36, soundlord wrote:

> Now I can do name resolution in every way (in reverse dns too).
> The only thing is that ever if I set run levels (3,5) correctly the
> service won’t start at boot, I have to do it “manually” with a script…
> that’s uncomfortable… I never had issues with bind/named to be started
> up at boot.

I don’t see obvious errors.

>
> I did not wrote it but named-checkconf was used but displayed nothing
> helpful…
>
> I know that there is a parsing error but I also know there is two
> named.conf that are strictly identical in /etc/ and
> /var/lib/named/etc…

One is copied to the other. It uses a chroot. You can disable that
behaviour for checking. It is tricky, mine failed till I disabled it.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)