Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-05-2009, 02:39 AM
|
#1
|
LQ Newbie
Registered: Nov 2006
Posts: 2
Rep:
|
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 :
|
|
|
05-05-2009, 02:51 AM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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; };
};
|
|
|
05-05-2009, 03:11 AM
|
#3
|
Member
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165
Rep:
|
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
|
|
|
05-06-2009, 06:34 AM
|
#4
|
LQ Newbie
Registered: Nov 2006
Posts: 2
Original Poster
Rep:
|
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
|
|
|
05-06-2009, 06:41 AM
|
#5
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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.
|
|
|
All times are GMT -5. The time now is 01:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|