Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
I tried writing the file locally by hand with 2-3 zones and it loads fine, I checked both file permissions and owners, and there are no problems. From what I tried right now, it seems that the problem could be of file encoding, since the file is generated automatically on a windows box. It seems strange that the line in which it finds the error is the first one (or maybe it's a hint to check encoding :) –  mox601 Jun 14 '10 at 15:35
    
Consider breaking the file into more manageable chunks. You can use include "filename"; lines to pull in files. –  Chris S Jun 14 '10 at 15:41
    
the solution has been to modify some characters and then save the file with file encoding changed to ASCII. A simple "save as..." didn't work because gedit stated that there were some characters that could not be saved with that encoding. Moral of the story: named.conf should be an ASCII file. If you are trying to use windows text files on linux, be sure that there will be problems if you don't double or triple check file encoding. –  mox601 Jun 16 '10 at 11:01
add comment

3 Answers 3

up vote 1 down vote accepted

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).

share|improve this answer
add comment

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).

share|improve this answer
    
+1 "syntax of the file" –  Chris S Jun 14 '10 at 15:39
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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