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

This is the error I get when executing /etc/init.d/bind9 restart

Jun  1 10:43:29 local-dns named[2922]: starting BIND 9.5.1-P1 -u bind
Jun  1 10:43:29 local-dns named[2922]: found 1 CPU, using 1 worker thread
Jun  1 10:43:29 local-dns named[2922]: using up to 4096 sockets
Jun  1 10:43:29 local-dns named[2922]: loading configuration from '/etc/bind/named.conf'
Jun  1 10:43:29 local-dns named[2922]: /etc/bind/named.conf.local:13: unexpected end of input
Jun  1 10:43:29 local-dns named[2922]: loading configuration: unexpected end of input
Jun  1 10:43:29 local-dns named[2922]: exiting (due to fatal error)

Here is my /etc/bind/named.conf.local

$TTL 86400
@       IN      SOA     ns1.test.com. (
                        2006020201
                        604800
                        86400
                        2419200
                        604800 )

NS      ns1
MX      10 mail

No matter what I do I can't seem to get the unexpected end of input error to go away. I've tried with a single line after the MX record and having the MX be the last line. I'm not sure why it's giving this error. Does anyone know what's up?

share|improve this question
    
+1 to offset the down vote. Jeff/Joel have made clear that basic questions are welcomed and "RTFM" responses are not desired. –  tomjedrz Jun 1 '09 at 17:14
    
I recommend reading tldp.org/HOWTO/DNS-HOWTO.html or isc.org/software/bind/documentation/arm95. Or if you're GUI person, use Fedora/RedHat/CentOS and its system-config-bind tool. @tomjedrz: I don't like RTFMs, too, but I don't see any value in this question. –  Cristian Ciupitu Jun 1 '09 at 17:23

2 Answers 2

up vote 5 down vote accepted

named.conf.local is where you define zones (domains) you are authoritative for. You are not supposed to put your DNS records here.

Your named.conf.local should look like this.

zone "test.com" {
        type master;
        file "/etc/bind/test.com.dns";
        allow-query {any;};
};

All the stuff you currently have there should be in a file named named /etc/bind/test.com.dns.

share|improve this answer
    
right on, that was the issue. props. –  razor Jun 1 '09 at 17:00

And if I may add something, please check again documentation for Bind, 'cause following is not a complete entry:

NS      ns1
share|improve this answer

Your Answer

 
discard

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