rndc: connection to remote host closed

“rndc: connection to remote host closed” error often happen while starting named — usually because of missing rndc.key, corrupt rndc.key or misconfigure in named configuration file or permission and ownership issue.

How to fix this problem?

rndc: connection to remote host closed
This may indicate that the remote server is using an older version of
the command protocol, this host is not authorized to connect,
or the key is invalid.

There are a few way to get around this:
[*] Sometime you just need to replace the key value at /etc/rndc.conf based on /etc/rndc.key. Make sure its the same.
[*] Delete the following from your named.conf
key rndc-key {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxxxxxxxx==";
};
controls {
inet * port 953 allow { any; } keys { rndc-key; };
};

[*] Generate a new key (will write it later).
[*] If you are on CPanel server, the following should do the trick:
Type: cd /scripts
Type: ./updatenow
Type: ./fixndc
Type: ./fixndc

Yes, twice.
[*] Ensure the rndc.key file permission is 640
[*] Ensure the rndc.key file owner is root:named
[*] Restart named
service named restart

Good luck!

Tagged with 
About sepedatua
I am nothing special, of this I am sure. I am a common man with common thoughts and I’ve led a common life. There are no monuments dedicated to me and my name will soon be forgotten, but I’ve loved another with all my heart and soul, and to me, this has always been enough.

Leave a Reply