LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2011, 01:21 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
named-checkconf has errors


My box is scientific lunux 6.1 86, and I restored previous running bind configuration. However I could not start named.

This is my "myserver.dyndns.org.zone" file which I used previous version.

Code:
$TTL 86400
@	IN	SOA	myserver.dyndns.org	test.dyndns.org (
			2007042623	;
			28800;
			7200;
			604800;
			86400;
			)
		IN	NS	myserver.dyndns.org
		IN	A	192.168.0.1
server		IN	A	192.168.0.1
And this the resilt of "named-checkconf".

Code:
[root@localhost dynamicdns_setup]# named-checkconf /var/named/chroot/var/named/myserver.dyndns.org.zone
/var/named/chroot/var/named/myserver.dyndns.org.zone:1: unknown option '$TTL'
/var/named/chroot/var/named/myserver.dyndns.org.zone:4: unknown option '28800'
/var/named/chroot/var/named/myserver.dyndns.org.zone:5: unknown option '7200'
/var/named/chroot/var/named/myserver.dyndns.org.zone:6: unknown option '604800'
/var/named/chroot/var/named/myserver.dyndns.org.zone:7: unknown option '86400'
/var/named/chroot/var/named/myserver.dyndns.org.zone:8: unknown option ')'
/var/named/chroot/var/named/myserver.dyndns.org.zone:11: unexpected token near end of file
Also I have another problem.

I've edited "rndckey" to "rndc-key" at "/etc/named.conf", But "service named start" still has an error message.

Quote:
service named start
Starting named:
Error in named configuration:
/etc/named.conf:7: unknown key 'rndckey'
[FAILED]
Please let me know how to resolve these errors.

Thanks in advance.

Last edited by windstory; 04-05-2012 at 11:09 AM.
 
Old 11-29-2011, 01:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Hi,

named-checkconf is used to check named.conf for errors.
If you want to check your zone file, you should use named-checkzone:
Code:
named-checkconf myserver.dyndns.org /var/named/chroot/var/named/myserver.dyndns.org.zone

Quote:
I've edited "rndckey" to "rndc-key" at "/etc/named.conf", But "service named start" still has an error message.

Quote:
service named start
Starting named:
Error in named configuration:
/etc/named.conf:7: unknown key 'rndckey'
[FAILED]
You should make sure that the key name is the same in both named.conf and rndc.conf.

Regards
 
1 members found this post helpful.
Old 11-29-2011, 02:17 AM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
bathory/
Thanks for your kind reply.

The result is here:

Quote:
[root@localhost dynamicdns_setup]# named-checkconf myserver.dyndns.org /var/named/chroot/var/named/myserver.dyndns.org.zone
usage: named-checkconf [-h] [-j] [-p] [-v] [-z] [-t directory] [named.conf]
[root@localhost dynamicdns_setup]# locate rndc.conf
/usr/share/doc/bind-9.7.3/arm/man.rndc.conf.html
/usr/share/man/man5/rndc.conf.5.gz
 
Old 11-29-2011, 02:34 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Oups sorry for that...
I said you need named-checkzone, but in the command I used named-checkconf.
Here is the correct one
Code:
named-checkzone myserver.dyndns.org /var/named/chroot/var/named/myserver.dyndns.org.zone
Or since you're running bind chrooted under /var/named/chroot,
Code:
named-checkzone -t var/named/chroot myserver.dyndns.org /var/named/myserver.dyndns.org.zone
 
Old 11-29-2011, 02:46 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
The results are here:

Quote:
[root@localhost dynamicdns_setup]# named-checkzone myserver.dyndns.org /var/named/chroot/var/named/myserver.dyndns.org.zone
zone myserver.dyndns.org/IN: NS 'myserver.dyndns.org.myserver.dyndns.org' has no address records (A or AAAA)
zone myserver.dyndns.org/IN: not loaded due to errors.

[root@localhost dynamicdns_setup]# named-checkzone -t /var/named/chroot myserver.dyndns.org /var/named/myserver.dyndns.org.zone
zone myserver.dyndns.org/IN: NS 'myserver.dyndns.org.myserver.dyndns.org' has no address records (A or AAAA)
zone myserver.dyndns.org/IN: not loaded due to errors.
 
Old 11-29-2011, 02:49 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
And the "0.168.192.in-addr.arpa.zone" file is:

Quote:
$TTL 86400
@ IN SOA @ root (
5;
28800;
7200;
604800;
86400;
)
IN NS server
1 IN PTR myserver.dyndns.org
 
Old 11-29-2011, 03:01 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
zone myserver.dyndns.org/IN: NS 'myserver.dyndns.org.myserver.dyndns.org' has no address records (A or AAAA)
This is because you missed the trailing dot in the NS RR and you don't have an A RR for it. So edit the zone file, using the following, increase the serial and re-check
Code:
...
		IN	NS	myserver.dyndns.org.
myserver   IN     A      192.168.0.1
...
Quote:
And the "0.168.192.in-addr.arpa.zone" file is:
Same goes for the reverse zone. Missed the trailing dot and you're using server instead of myserver in the NS RR
Code:
...
   IN NS myserver
1 IN PTR myserver.dyndns.org.
 
1 members found this post helpful.
Old 11-29-2011, 03:20 AM   #8
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thanks. But "0.168.192.in-addr.arpa.zone" file has still error.

Quote:
[root@localhost dynamicdns_setup]# named-checkzone -t /var/named/chroot myserver.dyndns.org /var/named/myserver.dyndns.org.zone
zone myserver.dyndns.org/IN: loaded serial 2011112901
OK


[root@localhost dynamicdns_setup]# named-checkconf -z
zone myserver.dyndns.org/IN: loaded serial 2011112902
zone 0.168.192.in-addr.arpa/IN: NS 'myserver.0.168.192.in-addr.arpa' has no address records (A or AAAA)
zone 0.168.192.in-addr.arpa/IN: not loaded due to errors.
_default/0.168.192.in-addr.arpa/IN: bad zone
I edited "0.168.192.in-addr.arpa.zone" as this:

Quote:
$TTL 86400
@ IN SOA @ root (
5;
28800;
7200;
604800;
86400;
)
IN NS myserver
1 IN PTR myserver.dyndns.org.

Last edited by windstory; 11-29-2011 at 03:23 AM.
 
Old 11-29-2011, 03:27 AM   #9
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
I changed "server" to "server.", then I got this result:

Quote:
[root@localhost dynamicdns_setup]# named-checkconf -z
zone myserver.dyndns.org/IN: loaded serial 2011112902
zone 0.168.192.in-addr.arpa/IN: loaded serial 6
Does this mean OK?
 
Old 11-29-2011, 03:36 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
I changed "server" to "server.", then I got this result:

Quote:
[root@localhost dynamicdns_setup]# named-checkconf -z
zone myserver.dyndns.org/IN: loaded serial 2011112902
zone 0.168.192.in-addr.arpa/IN: loaded serial 6
Does this mean OK?
It means that the zone file is correct, but it's not going to work, because you don't have an A RR for server.dyndns.org.
You need this:
Code:
$TTL 86400
@ IN SOA @ root (
5;
28800;
7200;
604800;
86400;
)
   IN NS myserver.dyndns.org. ;sorry forgot it as usual :redface:
1 IN PTR myserver.dyndns.org.
 
Old 11-29-2011, 03:42 AM   #11
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
bathory/ Thanks a lot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Errors starting Named jester_69 Linux - Server 3 01-19-2011 08:22 AM
named FORMERR errors brandon@rhiamet.com Linux - Server 3 02-11-2009 05:31 PM
Named errors and stuck in a bind! sir-lancealot Linux - Server 1 08-11-2007 06:34 PM
Red Hat: named daemon errors dsschanze Red Hat 2 01-29-2005 10:45 AM
named errors kik Linux - Networking 5 01-23-2002 11:04 AM


All times are GMT -5. The time now is 10:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration