LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-06-2008, 02:15 PM   #1
acutchin
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 11-06-2008, 02:26 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 11-06-2008, 07:43 PM   #3
acutchin
LQ Newbie
 
Registered: Oct 2006
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 11-10-2008, 01:41 AM   #4
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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:
//
//   The 'named.root' root cache hints zone for the bind DNS 'named' nameserver.
//
//   named's cache must be primed with the addresses of the root zone '.' nameservers.
//   The root zone file can be obtained by querying the root 'A' nameserver:
//     $ dig . ns @198.41.0.4 > named.root
//   Or by download via FTP / HTTP:
//     $ wget ftp://ftp.rs.internic.net/domain/named.root
//
//   Every view that is to provide recursive service must include this zone.
//
zone "." IN {
        
type hint;
        
file "named.root";
}; 
The clue is complaining about wanting '}' before ';', which points to named.conf syntax where ';' is used to close a statement and "//" is the start of a comment. In zone files, ';' is the start of a comment (such as line #1 in your root zone, which is exactly what the error said).
 
Old 11-10-2008, 09:43 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
  


Reply

Tags
bind, bind9, namedconf



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
service named cant start error in named.conf file gayanasa Linux - Server 2 07-02-2008 09:58 AM
chown -R named:named /var/named crash the system? joangopan Fedora 2 09-09-2007 02:46 AM
Why my named doesnt find named.root Yxaaaaaaa Linux - Software 4 01-26-2007 03:48 PM
named / bind error saurabh142857 Linux - Software 2 06-27-2005 10:30 AM
named -u named at startup zzero Linux - Newbie 4 03-16-2004 12:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration