Hi all,
Im having some problem with my DNS. We are using a Linux web server as one of our web server which runs some live websites.When I trying to get the status of the DNS (NAMED) it comes the following error :

[root@ns milindras]# /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused

The same error appears when Im trying to apply any changes on zone level for a selected doamin in WEBMIN. (Basically can't apply changes)

WEBMIN > Servers > BIND DNS servers > click a > Apply changes

NDC command failed : rndc: connect failed: 127.0.0.1#953: connection refused

But the server seems to be running without effecting any probelms to the sites or users.
I have been searching weeks for this problem & couldn't find a solution.
And also Please note that Im bit new to Linux.

Server details :
Linux version 2.6.18-1.2257.fc5smp
Red Hat 4.1.1-1

Appreciate any help on this problem.
Thanks
regards
Milindra

Dani AI

Generated

Short summary and context: the rndc message means the rndc control channel on localhost:953 could not be reached — either because named wasn’t listening on 127.0.0.1:953 or because named refused to create the command channel (common when it cannot read the rndc key, is chrooted, or has a config error). In this thread ultimately had a permissions problem and ’s ownership hint pointed the right way; that pattern (rndc.key permission/ownership or missing include) is a well-known cause. (access.redhat.com)

Practical checks and fixes to apply (do these before using Webmin to apply zones):

  • Confirm a process is listening on TCP port 953 on loopback and check named logs for messages like “open: /etc/rndc.key: permission denied” or “couldn’t add command channel”.
  • Ensure the server and rndc agree on the key: either include the generated key in named.conf or let both use /etc/rndc.key. If rndc.key is missing, generate it with rndc-confgen.
  • Make the key readable only by root and readable by named’s group (group varies by distro), and place a copy inside the chroot if named runs chrooted. If SELinux is enabled, restore the correct file context.

Example commands (adjust group/name per distro):

ss -ltnp | grep :953     # is named listening on :953?
sudo tail -n50 /var/log/messages | grep -i 'rndc\|command channel'
sudo rndc-confgen -a      # create /etc/rndc.key if missing
sudo chown root:named /etc/rndc.key
sudo chmod 640 /etc/rndc.key

The rndc-confgen behavior and proper controls/key placement are documented in the BIND docs; many reports show resolving this error by fixing rndc.key ownership/permissions. (ibm.com)

Final notes: if named fails to listen because of a syntax/config error, run named-checkconf before restart. After correcting ownership/SELinux/chroot issues and restarting named, rndc status (or Webmin’s apply) should succeed. (elatov.github.io)

Recommended Answers

All 3 Replies

Yes the problem was sorted. It was a permission problem.
Thanks

It may be a problem with your permission & ownership of your zone file.
ownership of your var/named/mydomain.com.zone as well as /var/named/<ipaddress.zone> should be "named"
changed it with this command
# cd /var/named
# chown mydomain.com.zone named named

also check chkconfig command

I Think it w

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.