Bind server stops after adding new domain

I have now checked it again, it seems that You`re right, the BIND is running when I verified it via CLI

[root@srv1 ~]# service named restart Stopping named: .[ OK ] Starting named: [ OK ] [root@srv1 ~]#

But Webmin says that BIND is down… so there has to be some issue with Webmin in this case ?
I am not 100% sure, but what else it could be …

I think that Webmin version 1.580 should be checked by Jamie or ?

PS: have tried to create a new master zone via Webmin, and when I create the ZONE I have to manually REFRESH bind in the browser in order to be able to see that zone in the list. Than when I tried to create some records within this zone, I received following error:

Failed to save record : Failed to open /var/named/chroot/var/named/mydomain.com.hosts for writing : Bad file descriptor

And these issues I mentioned in this last post are tested in clean installed CentOS 6 and Webmin/Virtualmin installed from install.sh …

Amel

Jamie is looking into all that. There’s some fixes for the specific issues you mentioned in the bug report though, those are things you could apply now while waiting for his formal fix.

-Eric

I saw what Jamie wrote, I will try to do so as workaround until final patch is released…

Thank You for helping

Amel

this is what Jamie wrote:

Stop BIND
Edit /etc/sysconfig/named and remove the ROOTDIR line.
Start BIND again

BUT here is mine /etc/sysconfig/named output, as You will notice all the lines are commented and not in use, so there is no point to remove anything here as it is not in use … I do not understand …

# BIND named process options # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Currently, you can use the following options: # # ROOTDIR="/var/named/chroot" -- will run named in a chroot environment. # you must set up the chroot environment # (install the bind-chroot package) before # doing this. # NOTE: # Those directories are automatically mounted to chroot if they are # empty in the ROOTDIR directory. It will simplify maintenance of your # chroot environment. # - /var/named # - /etc/pki/dnssec-keys # - /etc/named # - /usr/lib64/bind or /usr/lib/bind (architecture dependent) # # Those files are mounted as well if target file doesn't exist in # chroot. # - /etc/named.conf # - /etc/rndc.conf # - /etc/rndc.key # - /etc/named.rfc1912.zones # - /etc/named.dnssec.keys # - /etc/named.iscdlv.key # # Don't forget to add "$AddUnixListenSocket /var/named/chroot/dev/log" # line to your /etc/rsyslog.conf file. Otherwise your logging becomes # broken when rsyslogd daemon is restarted (due update, for example). # # OPTIONS="whatever" -- These additional options will be passed to named # at startup. Don't add -t here, use ROOTDIR instead. # # KEYTAB_FILE="/dir/file" -- Specify named service keytab file (for GSS-TSIG) # # DISABLE_ZONE_CHECKING -- By default, initscript calls named-checkzone # utility for every zone to ensure all zones are # valid before named starts. If you set this option # to 'yes' then initscript doesn't perform those # checks.

I would like to make a comment on this because the same thing has happened to me.

Whenever I manually add a new domain “Create master zone”, and apply the zone/configuration BIND will fail to restart.

This happens because the permissions for /etc/named.conf get changed to root root

I then have to manually do chown root:named /etc/named.conf

Hope this helps everyone understand this issue more so it can fixed.

Also please note adding domains through “Create Virtual Server” do NOT cause this issue.

There’s a better solution to this irritating problem. From Webmin’s main BIND page, click “Module Config”. Choose “Zone file options” from the drop down list. Change “Owner for zone files” from “Default” to “root:named”.

Had this provlem following DNS Configuration instructions on http://www.virtualmin.com/documentation/cloudmin/gettingstarted for Cloudmin. Rob’s advice solved the issue.