unexpected end of input, bind9 zones

Barry Margolin barmar at alum.mit.edu
Sat May 8 07:09:04 UTC 2004


In article <c7hu52$43p$1 at sf1.isc.org>, "dave" <dmehler26 at woh.rr.com> 
wrote:

> Hello,
>     I'm trying to configure bind 9.2.2 on an rh9 box. I've got the zone
> files in place, and confirmed they're syntax wise at least right by running
> named-checkconf. I start named, it starts up alright, but i don't get name

named-checkconf checks the syntax of the named.conf file, it doesn't 
check the syntax of the zone files.  You need to use named-checkzone for 
that.

> resolution and in my logs i am seeing information about unexpected end of
> input and so forth. I especially don't get the '$' error, the top of my zone
> file i have:
> $TTL
> statement as needed by bind9.

That $TTL directive requires a parameter -- the default TTL.  E.g.

$TTL 1D

to set the default TTL to 1 day.

> Any help appreciated.
> Thanks.
> Dave.
> 
> May  8 01:54:36 wserv named[21865]: starting BIND 9.2.2 -u named
> May  8 01:54:36 wserv named[21865]: using 1 CPU
> May  8 01:54:36 wserv named[21865]: loading configuration from
> '/etc/named.conf'
> May  8 01:54:36 wserv named: named startup succeeded
> May  8 01:54:36 wserv named[21865]: no IPv6 interfaces found
> May  8 01:54:36 wserv named[21865]: listening on IPv4 interface lo,
> 127.0.0.1#53
> May  8 01:54:36 wserv named[21865]: listening on IPv4 interface eth0,
> 192.168.0.5#53
> May  8 01:54:36 wserv named[21865]: command channel listening on
> 127.0.0.1#953
> May  8 01:54:36 wserv named[21865]: zone 0.0.127.in-addr.arpa/IN: loaded
> serial 1997022700
> May  8 01:54:36 wserv named[21865]: dns_master_load: example.local:1:
> unknown $ directive '$'

That seems to indicate that you have a line like:

$$ something

at the beginning of example.local.

> May  8 01:54:36 wserv named[21865]: zone 0.168.192.in-addr.arpa/IN: loading
> master file example.local: syntax error
> May  8 01:54:36 wserv named[21865]: dns_master_load: example.zone:2:
> ignoring out-of-zone data (example.net)

The named.conf file says that this zone file is for a zone named 
"example", but on line 2 of the file you have a record for the domain 
"example.net", which is not within that zone.

> May  8 01:54:36 wserv named[21865]: dns_master_load: example.zone:10:
> unexpected end of line

What's on line 10 of example.zone?

> May  8 01:54:36 wserv named[21865]: dns_master_load: example.zone:9:
> unexpected end of input
> May  8 01:54:36 wserv named[21865]: zone example/IN: loading master file
> example.zone: unexpected end of input
> May  8 01:54:36 wserv named[21865]: zone localhost/IN: loaded serial 42
> May  8 01:54:36 wserv named[21865]: running

Why don't you post the files named.conf, example.local, and example.zone?

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


More information about the bind-users mailing list