NDC command failed

I am not sure whether this is Virtualmin issue or just Webmin (but since install.sh installed everything, I am reporting it here) just FYI

I tried to "Apply Zone" (Webmin-> Bind DNS Server section) and get the following error:

NDC command failed : rndc: /etc/bind/rndc.conf does not exist

That file doesn't exist indeed. Restarting Bind works fine, but doesn't help. Apply Configuration works as well.



Howdy -- hmm, is there perhaps an rndc.conf somewhere else in /etc?

What does this command output:

find /etc -name rndc.conf

I did that already, but the file doesn't exist (anywhere).

By the way, I also tried this on a fresh Debian install. The file doesn't exist there either, but there is no error when "applying Zone".

If you go into Webmin -> Servers -> BIND -> Module Config -> System Config, what is "Command to apply BIND configuration" set to?

It is set to Just send HUP signal.

Just to clarify. There is no error after "Apply Configuration". Only after "Apply Zone".

Did you try clicking "Setup RNDC" on the main page of the BIND module?

I haven't done that yet (and on Centos and Debian this hasn't been necessary since apply zone works fine even without the rndc.conf file. So it is probably something Ubuntu 14.04 specific).

I just clicked that button and got the following message

RNDC appears to be setup properly already, so you probably do not need to use this form.

And then

Are you sure you want to create the RNDC configuration file /etc/bind/rndc.conf, and enable control by RNDC in your BIND configuration?

I guess I should do some reading first whether I really want that.

Generally it is quite safe to set this up.

Ok, thanks. I tried it :-) It took roughly 5 minutes(!) to complete (that is to create the rndc.conf file).

Rndc.conf basically just contains a new rndc-key. I guess it is an Ubuntu bug (and not webmin), because on Centos and Debias the system works with just the /etc/bind/rndc.key (without rndc.conf)?

click the 'setup RNDC' icon in the webmin 'BIND DNS Server' screen and confirm to do the setup. This creates the missing rndc.conf file.