I am trying to set up a test environment on my local machine, and I am trying to start a DNS daemon that loads tha configuration from a named.conf.custom file.
As long as the size of that file is like 3-4 zones, the bind9 daemon loads fine, but when i enter the config file i need (like 10000 lines long), bind can't startup and in the syslog i find this message:
starting BIND 9.7.0-P1 -u bind
Jun 14 17:06:06 cibionte-pc named[9785]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
Jun 14 17:06:06 cibionte-pc named[9785]: adjusted limit on open files from 1024 to 1048576
Jun 14 17:06:06 cibionte-pc named[9785]: found 1 CPU, using 1 worker thread
Jun 14 17:06:06 cibionte-pc named[9785]: using up to 4096 sockets
Jun 14 17:06:06 cibionte-pc named[9785]: loading configuration from '/etc/bind/named.conf'
Jun 14 17:06:06 cibionte-pc named[9785]: /etc/bind/named.conf.saferinternet:1: unknown option 'zone'
Jun 14 17:06:06 cibionte-pc named[9785]: loading configuration: failure
Jun 14 17:06:06 cibionte-pc named[9785]: exiting (due to fatal error)
Are there any limits on the file size bind9 is allowed to load?
The BIND log says there's an error in
/etc/bind/named.conf.saferinternet
. Have you confirmed that this file loads correctly if it's the only one loaded?If not that file, check that the syntax of the file loaded immediately before it is correct (no missing trailing semicolons, etc).
I am not aware of any limits specific to BIND (I run a number of DNS servers on BIND with conf files that contain many thousands of zones). From the error it looks like a semicolon might be missing somewhere in front of a subsequent zone statement (or some other minor formatting error that is breaking the configuration parsing process).
Ensure that the generation script is not writing very, very long lines. A common problem is to forget the line breaks, and there is an internal maximum line buffer length which sometimes bites people. This also commonly shows up as an error on line 1, or whatever line is too long.
If you are writing out the file on different lines, then you may need to paste a few lines from your file.