rndc: connect failed: 127.0.0.1#953: connection refused

Do you have a controls clause in your named.conf

Mine looks like this:

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

If not you might want to look for errors in /var/log/messages

You can see the default named.conf here -> http://directadmin.com/named.conf
 
Last edited:
Oct 29 20:41:11 server named[17538]: adjusted limit on open files from 65535 to 1048576
Oct 29 20:41:11 server named[17538]: found 1 CPU, using 1 worker thread
Oct 29 20:41:11 server named[17538]: using up to 4096 sockets
Oct 29 20:41:11 server named[17538]: loading configuration from '/etc/named.conf'
Oct 29 20:41:11 server named[17538]: /etc/named.conf:45: unknown key 'rndckey'
Oct 29 20:41:11 server named[17538]: /etc/named.conf:76: zone '.': already exists previous definition: /etc/named.conf:47
Oct 29 20:41:11 server named[17538]: /etc/named.rfc1912.zones:19: zone 'localhost': already exists previous definition: /etc/named.conf:52
Oct 29 20:41:11 server named[17538]: loading configuration: failure
Oct 29 20:41:11 server named[17538]: exiting (due to fatal error)


I tried,. but I get the rndckey error as shown above.
 
Just a guess (not even sure could it be related to your errors in logs or not)... make sure, you've got no Portreserve running on your server. I've got the same issue some time ago, I've spent some hours, before I found portreserve, which blocked rndc from connecting to 953 port.
 
I had comparable problems and solved it by setting the owners and permissions for rndc.key as follows:
Code:
# ls -la rndc.key
-rw-r-----. 1 root named 77 Jan 31  2012 rndc.key
#
 
I think it's something else... this is the error:
Code:
 unknown key 'rndckey'
Check you rndc.key if it indeed states rndckey or if it's rndc-key or rdnc_key or something else.
The name in named.conf should be exactly the same as mentioned in the rndc.key file.
 
It's a bit late but if someone has the same error

Code:
unknown key 'rndckey'

it's because you have to include your key

Code:
include "/etc/rndc.key";

and also use the right permissions
Code:
chown root:named /etc/rndc.key
chmod 640 /etc/rndc.key
 
Back
Top