Problems with rndc

Kevin Darcy kcd at daimlerchrysler.com
Fri Jun 15 23:35:26 UTC 2007


Toni Fandos wrote:
> Hi,
> I have made some changes to my bind named.conf.local, so want to restart the
> service.
>
> But, when i try /etc/init.d/bind9 restart, i get the following error:
>
> Stopping domain name service: namedrndc: connect failed: connection refused
> .
> Starting domain name service: named.
>
>
> When listing the processes, to check if named is running, i get
>
> liborio:/etc/bind# ps aux|grep named
>
> root 1146 0.0 0.6 15728 5536 ? Ss Jan05 0:00 /usr/sbin/named -u root -c
> /etc/bind/named.conf
>
> root 1148 0.0 0.6 15728 5536 ? S Jan05 0:00 /usr/sbin/named -u root -c
> /etc/bind/named.conf
>
> root 1149 0.0 0.6 15728 5536 ? S Jan05 17:03 /usr/sbin/named -u root -c
> /etc/bind/named.conf
>
> root 1150 0.0 0.6 15728 5536 ? S Jan05 0:09 /usr/sbin/named -u root -c
> /etc/bind/named.conf
>
> root 1151 0.0 0.6 15728 5536 ? S Jan05 2:02 /usr/sbin/named -u root -c
> /etc/bind/named.conf
>
> 5 processes running at the time!. It's that normal?
>
>
> As i have read from posts, the issue can also be related to the rndc.key.
> But, when checking the configuration, neither named.conf, nor
> named.conf.options refer the use of rndc.key, neither do i have a
> rndc.confin the bind directory.
>
> So, if no requesting the key, and named is running, why do i get this error,
> and can't stop the process?
>
>   

Is /etc/init.d/bind9 trying to use rndc to stop named? Seems like it. If so, then you'll need to either configure rndc to work, or modify /etc/init.d/bind9 to use some other mechanism to stop named.

If "/etc/init.d/bind9 restart" is failing to stop named, and not detecting its failure, then chances are that it is starting up a duplicate instance and that's why you're seeing multiple named processes on a "ps".

Who writes this stuff anyway? Whenever you attempt to stop a process, *CHECK* that the process actually died before you do anything else that has a dependency on the process being stopped. This is Admin Scripting 101 stuff.

							- Kevin




More information about the bind-users mailing list