LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unknown key 'rndc' (https://www.linuxquestions.org/questions/linux-newbie-8/unknown-key-rndc-4175493223/)

pavanchauhan 01-31-2014 01:14 AM

unknown key 'rndc'
 
i have install bind and i'm facing problem in service restart, and i 'm getting error
error in named configuaration
"/etc/named.conf:8 unknown key 'rndckey'

My Installation step

# yum install bind* -y
# vim /etc/named.conf
[root@server named]# cat /etc/named.conf
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
};

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

zone "." IN {
type hint;
file "named.ca";
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

zone "chul.com" IN {
type master;
file "chul.zone";
allow-update { none; };
};

zone "80.168.192.in-addr.arpa" IN {
type master;
file "80.zone";
allow-update { none; };
};

include "/etc/rndc.key";

[root@server named]# pwd
/var/named
[root@server named]# ls
80.zone dynamic named.ca named.localhost
chroot localdomain.zone named.empty named.loopback
chul.zone localhost.zone named.ip6.local named.zero
data named.broadcast named.local slaves


[root@server named]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:8: unknown key 'rndckey'
[FAILED]
umount: /var/named/chroot/var/named: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))


Please sir tell me what is the issue, i'm wathcing this is steps in web and their named service had succesfully start but my named service not start.
if i comment like this #controls {
# inet 127.0.0.1 allow { localhost; } keys { #rndckey; };
#};
this line when i'm getting named service start succesfully. if i does not comment this line while i'm facing error. Please sir what's the issue. Anybody help me

bathory 01-31-2014 02:46 AM

Hi,
Quote:

<snip>
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
<snip>
include "/etc/rndc.key";
Make sure that the rndc key name is the same in both named.conf and the included rndc.key.
From the above snippet it should be "rndckey" in both files.


All times are GMT -5. The time now is 09:28 AM.