BIND/named Startup Error - named.root:1: '}' expected near ';'
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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]
=======================================================
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.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.