LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2009, 02:39 AM   #1
Owiza007
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
Please Help Syntax Error in named.conf file


here is my named.conf and the log msg. please help me solve this syntax problem.


channel my_file {
file "log.msgs";
severity dynamic;
print-category yes;
print-severity yes;
};
category resolver { my_file; };
category lame-servers { null; };
category cname { null; };
category update { null; };
category security { null; };
category default { default_syslog; };
};

view "localhost" {
match-clients {localmachine; };
recursion yes;
};

75:view "external" {
match-clients {
any;
};
recursion yes;
include "/etc/named.conf-externals";

};

include "/etc/rndc.key";

view internal {
match-clients {
!xx:xx:xx:xx;
!xx:xx:xx:xx;
internals;
};
};
server xx:xx:xx:xx; {
};
~
/etc/named.conf:75: syntax error near '}'

May 05 09:17:56.044 starting BIND 9.2.4 -g
May 05 09:17:56.045 using 1 CPU
May 05 09:17:56.067 loading configuration from '/etc/named.conf'
May 05 09:17:56.087 /etc/named.conf:75: syntax error near '}'
May 05 09:17:56.087 loading configuration: unexpected token
May 05 09:17:56.088 exiting (due to fatal error)
Error in configuration file /etc/named.conf :
 
Old 05-05-2009, 02:51 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Is this the complete file? You get an error in line 75, but you posted only 39 lines. Anyway there is a closing bracket that doesn't match an opening one:
Code:
category default { default_syslog; };
};
 
Old 05-05-2009, 03:11 AM   #3
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
You have an extra curly bracket after "category default { default_syslog; };"

colucix got there before me.

Last edited by Libu; 05-05-2009 at 03:12 AM. Reason: redundant post
 
Old 05-06-2009, 06:34 AM   #4
Owiza007
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Original Poster
Rep: Reputation: 0
named.conf syntax error

hello guys, i have posted the whole named.conf file, and the errors i m getting please help me !!!

acl slaves {

xx.xx.xx.xx;
xx.xx.xx.xx;

};

acl ns2internal {
xx.xx.xx.xx;
};

acl ns2external {
xx.xx.xx.xx;
xx.xx.xx.xx;
};

acl internals {
xx.xx.xx.xx/29;
};

acl localmachine {
127.0.0.1;
xx.xx.xx.xx;
xx.xx.xx.xx;
xx.xx.xx.xx;
};

options {
directory "/var/named";
query-source address * port 53;
allow-transfer {
slaves;
};
forwarders {
xx.xx.xx.xx;
xx.xx.xx.xx;
};
};

controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

logging {
channel my_file {
file "log.msgs";
severity dynamic;
print-category yes;
print-severity yes;
};
category resolver { my_file; };
category lame-servers { null; };
category cname { null; };
category update { null; };
category security { null; };
category default { default_syslog; };

view "localhost" {
match-clients {localmachine; };
recursion yes;
};


view "external" {

match-clients {
any;
};
recursion yes;
include "/etc/named.conf-externals";

};

include "/etc/rndc.key";
view internal {
match-clients {
!xx.xx.xx.xx;
!xx.xx.xx.xx;
internals;
};
};
server xx.xx.xx.xx; {
};


Stopping named:
Starting named: /etc/named.conf:69: unknown option 'view'
/etc/named.conf:75: unknown option 'view'
/etc/rndc.key:1: unknown option 'key'
/etc/named.conf:86: unknown option 'view'
/etc/named.conf:93: unknown option 'server'
/etc/named.conf:93: unknown option 'xx.xx.xx.xx'
/etc/named.conf:95: '}' expected near end of file

May 06 13:33:00.800 starting BIND 9.2.4 -g
May 06 13:33:00.800 using 1 CPU
May 06 13:33:00.804 loading configuration from '/etc/named.conf'
May 06 13:33:00.804 /etc/named.conf:75: syntax error near '}'
May 06 13:33:00.805 loading configuration: unexpected token
May 06 13:33:00.805 exiting (due to fatal error)
Error in configuration file /etc/named.conf : [FAILED]

Regards
 
Old 05-06-2009, 06:41 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The bracket after logging { is not closed, hence "view" is seen as an option, which is not valid. Put the correct closing bracket and see if you get other errors.
 
  


Reply



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
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Annoying syntax error with named.conf d0ugb Linux - Networking 7 08-07-2005 12:20 PM
How do i create named.conf file pkrishna10 Linux - Wireless Networking 2 10-22-2004 12:54 PM
named.conf ... acl syntax freaky al Linux - Networking 12 08-28-2004 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:19 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