BIND/named Startup Error - named.root:1: '}' expected near ';'
I am getting a strange error when trying to start named. I have searched the web and some of the boards, but have not found any useful information except to verify that all your braces are closed in named.conf. I have visually checked this a hundred times now, and still have the error. Please review my configs and tell me if I've missed something!
Here is the error: ======================================================= [root@my-server named]# service named start Starting named: Error in named configuration: /etc/named/named.root:1: '}' expected near ';' [FAILED] ======================================================= Here is my packages: ======================================================= [root@my-server named]# rpm -qa | grep bind bind-utils-9.3.4-6.0.2.P1.el5_2 bind-9.3.4-6.0.2.P1.el5_2 bind-libs-9.3.4-6.0.2.P1.el5_2 ======================================================= My named.conf (anonymized personal info): ======================================================= options { listen-on port 53 { 127.0.0.1; }; listen-on port 53 { 1.2.3.4; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { localhost; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; view localhost_resolver { match-clients { localhost; }; match-destinations { localhost; }; recursion yes; include "/etc/named/named.root"; include "/etc/named/named.rfc1912.zones"; }; key ddns_key { algorithm hmac-md5; secret "use /usr/sbin/dns-keygen to generate TSIG keys"; }; view "external" { match-clients { any; }; match-destinations { any; }; recursion no; include "/etc/named/named.root"; zone "mydomain.com" { type master; file "mydomain.com.master.zone"; }; }; ======================================================= My named.root file (copied from internic.net) ======================================================= ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . <file>" ; configuration file of BIND domain name servers). ; ; This file is made available by InterNIC ; under anonymous FTP as ; file /domain/named.root ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; ; last update: Feb 04, 2008 ; related version of root zone: 2008020400 ; ; formerly NS.INTERNIC.NET ; . 3600000 IN NS A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:BA3E::2:30 ; ; formerly NS1.ISI.EDU ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201 ; ; formerly C.PSI.NET ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 ; ; formerly TERP.UMD.EDU ; . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 ; ; formerly NS.NASA.GOV ; . 3600000 NS E.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 ; ; formerly NS.ISC.ORG ; . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f ; ; formerly NS.NIC.DDN.MIL ; . 3600000 NS G.ROOT-SERVERS.NET. G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 ; ; formerly AOS.ARL.ARMY.MIL ; . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235 ; ; formerly NIC.NORDU.NET ; . 3600000 NS I.ROOT-SERVERS.NET. I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 ; ; operated by VeriSign, Inc. ; . 3600000 NS J.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30 J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:C27::2:30 ; ; operated by RIPE NCC ; . 3600000 NS K.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1 ; ; operated by ICANN ; . 3600000 NS L.ROOT-SERVERS.NET. L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42 ; ; operated by WIDE ; . 3600000 NS M.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33 M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35 ; End of File ======================================================= Thanks in advance for any insight you can offer! -- acutchin |
I would imagine that the named.root doesn't get an include from the named.conf but rather this file goes into your zone file location. Since it's complaining about the lack of ; in the file, which it isn't, it's a zone file, not a conf file.
|
Thanks for your help, trickykid, but I don't think that's the issue. Look at the Bind 9.3.4 sample named.conf file:
======================================================================== view "internal" { ... // all views must contain the root hints zone: include "/etc/named.root.hints"; ... ======================================================================== As you can see, you are supposed to include it in every view, apparently by absolute path. The sample doesn't place it in /var/named, and doesn't define it with a "zone" statement. |
Well if you read the BIND admin manual, you'd see that include simply inserts configuration information from another file, i.e. it has to be valid named.conf syntax, not zone file syntax. What you're supposed to include is the '.' zone configuration. Here's a sample from CentOS:
PHP Code:
|
Exactly what chort pointed out and myself, sorry if I wasn't as clear before. You're trying to load a zone file as a conf file.
|
All times are GMT -5. The time now is 02:56 PM. |