Failed to start BIND 9.9 - Webmin

29 posts / 0 new
Last post
#1 Fri, 04/13/2012 - 22:06
HSS

Failed to start BIND 9.9 - Webmin

I can't start BIND 9.9.0 through the Webmin 1.585.

However, when running the following command it starts correctly:
/etc/rc.d/init.d/named start

I'm running the CentOS 6.2

# ps auxw | grep named
named 3715 0.0 3.0 282124 15804 ? Ssl 00:00 0:00 /usr/sbin/named-sdb -u named
root 4559 0.0 0.1 103232 856 pts/1 S+ 00:43 0:00 grep named

# whereis named
named: /usr/sbin/named /etc/named /etc/named.conf

What am I missing?
I'm not sure what I'm doing wrong.

Thanks

Sun, 04/15/2012 - 07:17
ronald
ronald's picture

With Centos 6.x make sure BIND is not running in chroot. You can do this in the BIND module config.

Tue, 04/17/2012 - 09:51
warren0728

i'm having the same issue and i want to do the above.

I attached my bind configuration and if i read this thread correctly all i need to do is choose "none" for "Chroot directory to run BIND under"

do i need to change any other settings?

thanks, ww

Wed, 04/18/2012 - 01:01
ronald
ronald's picture

is named under chroot directory? Choose No
that should be about it.

Thu, 04/19/2012 - 12:24
warren0728

when i do this and then save i get the message below....which should i choose....i'm assuming "Setup as an internet name server, and download root server information"

everything seems to be working ok as is so i'm afraid to screw with it!

BIND DNS Server BIND version 9.7.3 Start BIND Search Docs..

The primary configuration file for BIND /etc/named.conf does not exist, or is not valid. Create it?

Setup nameserver for internal non-internet use only

Setup as an internet name server, and download root server information

Setup as an internet name server, but use Webmin's older root server information

Fri, 04/20/2012 - 03:00
ronald
ronald's picture

IF you have BIND running it shouldn't ask those questions.. unless the config doesn't point to the right location.
Are you running under centos 6.x as well?

Fri, 04/20/2012 - 07:25
warren0728

yeah centos 6.x

that's what i thought...it must be running or i would be having issues though right?

Fri, 04/20/2012 - 08:16
ronald
ronald's picture

If BIND is not running it is likely that your websites aren't visible when you rely on DNS on the virtualmin box ...

Per haps in your case some paths are incorrect (below is what I have on centos 6.2)
Webmin-server-BIND dns server-module config- System configuration

Full path to the named.conf file /etc/named.conf
Full path to the named executable /usr/sbin/named
Default PID file location(s) /var/run/named/named.pid

you can compare this to your own settings and locations to see if such files exist

Fri, 04/20/2012 - 09:20
warren0728

thanks i'll check....the server is running great all sites are visible...mail working fine....that's why i've been afraid to mess with it!

Thu, 05/03/2012 - 15:33
warren0728

hey ronald my paths were the same....here's the problem....

Virtual servers i added before changing the bind settings suggested in this thread are still visible to the web and email and ftp work just fine....BUT when i try to look at the dns info for those sites i get an error in webmin saying config file can't be found.

HOWEVER after changing the bind settings to not run in chroot....when i add a virtual server it installs ok but is not visible to ftp or the web....BUT when i look at those servers dns info and records in webmin i see all the zone files and everything looks good but like i said they are invisible to the web.

any suggestions?

thanks, ww

Mon, 05/07/2012 - 12:15
warren0728

anybody have any ideas or directions where i should be looking?

thanks in advance, ww

Mon, 05/07/2012 - 15:50
ronald
ronald's picture

did you check the domains with www.intodns.com? to see early errors

Mon, 05/07/2012 - 17:33
warren0728

ok....here are links to two domain names added as virtual servers with virtualmin run through intodns.com

warrenworld.com was added BEFORE i changed the settings recommended in this thread....it seems to be finding everything ok....no red flags.... http://www.intodns.com/warrenworld.com

mybocavet.com was added AFTER making these changes....lots of red flags like it can't find the info it needs? http://www.intodns.com/mybocavet.com

i have since reverted back to the original settings but the issue persists....

i'm thinking it was setup originally without using bind? is that possible? and then i changed it to start using bind when making the changes and my problems started....almost like there are two named.conf files in different directories or something....i am confused....

thanks for the help!

Tue, 05/08/2012 - 05:10
ronald
ronald's picture

Did you restart BIND?
Is the zonefile for that domain correct and did you check the paths to /etc/named.conf?
You can also try in the BIND module to click on Addresses and Topology and add your IP's of the nameservers.

Tue, 05/08/2012 - 07:55
warren0728

i did restart bind and the zonefile records look correct to me....

here's the thing....when i look in the bind module i only see zone files for the two domains that i added after the chroot change....and these are the only two dopmains that aren't working. I don't see any zone files for all the other domains added before the chroot change and yet all those domains are working no problem.

Tue, 05/08/2012 - 10:25
ronald
ronald's picture

it sounds like old domains are created in the /chroot directory and the new ones a few levels up.
I would probably move all zonefiles to /var/named and then make sure the paths in the modules config are correct.

Wed, 05/09/2012 - 13:39
warren0728

thanks ronald....that makes sense to me....i'll look into it.

Tue, 05/15/2012 - 11:37
warren0728

i am feeling stupid....i can't get this worked out....i tried moving the newly added domains (that aren't working) to the named folder where the domains that were working are located....still didn't work.

i am about to lose a client (at least one) because i can't seem to make their sites visible.

any more suggestions....i don't want to goof up all the domains that are currently working so i'm nervous to try to much.

Sun, 06/10/2012 - 08:44
warren0728

never figured this out and when i tried to do a backup to my second harddrive it failed because it couldn't find the domains....so now i ca't even back everything up before i start messing with the settings....

any ideas?

Sun, 06/10/2012 - 14:01
warren0728

ok here's is my game plan....please stop me if this sounds wrong!

since the domains that are working are IN the chroot directory and the domains that don't work (only 2 at the moment) are NOT in the chroot directory....i am going to delete the two domains outside of chroot....then set my paths within webmin to point to the correct directories (under chroot) and then reinstall the domains that weren't working.

Does this sound ok?

thanks in advance, ww

Sun, 06/10/2012 - 16:48
ronald
ronald's picture

you can certainly try that.

Mon, 06/11/2012 - 10:26
warren0728

does it sound like the correct approach?

when i set the paths in webmin i'm just telling webmin where to look....correct? not actually changing any paths?

thanks, ww

Mon, 06/11/2012 - 12:53
ronald
ronald's picture

yes you tell webmin where to look for the files.

Wed, 07/11/2012 - 00:46
warren0728

i am still having problems with this -_-

i have made sure all my paths are correct (to files under chroot) and when i try to save the settings i get this error....

"The primary configuration file for BIND var/named/chroot/etc/named.conf does not exist, or is not valid. Create it?"

note: i see the file "named.conf" in the correct directory and when i open it i see all the domains that are currently working but i notice the paths to the hosts files are incorrect but all the domains are working.

so i choose "Setup as an internet name server, and download root server information" and i get the following error.

"Download failed : Uncompression of root zone file failed : sh: var/named/chroot/etc/db.cache: No such file or directory "

the file is there....i can see it

i don't know why this is so complicated....seems like it should be simple. any suggestions?

thanks in advance

Wed, 07/11/2012 - 02:23
ronald
ronald's picture

In this whole thread is discussed to disable chroot in webmin under centos 6.x
I see you still use chroot ... this is most likely why the errors are there.

RedHat has changed the behaviour of some things in RHEL 6 and thus the changes are also in Centos 6.x.
One of those changes is how BIND is now working. For Webmin to handle it correctly, you must disable chroot settings in webmin.

so, var/named/chroot/etc/named.conf should be /etc/named.conf
zonefiles are under /var/named
slave zonefiles are under /var/named/slaves

i hope this helps

Wed, 07/11/2012 - 04:40
warren0728

that's what everyone keeps saying ronald but the issue is all my domains that were originally (and still are) under the chroot directory are working fine....

in fact i had no problems at all until i disabled the chroot settings....no domain i have added since then has worked but the domains on the server before i made the chroot changes work fine (and still do)

i'm at my wits end here

Wed, 07/11/2012 - 08:07
ronald
ronald's picture

Yes I understand and its not so easy
but you would probably need to adjust the paths when disabling the chroot.

Centos 6.x handles chroot in a different manner and webmin gets confused somehow. So you probably want to have BIND in the default settings in how CentOS 6.x wants it.

Per haps Eric/Jamie would be willing to log into your box and fix the issue? You may want to submit a bugreport in this case.

Wed, 07/11/2012 - 17:30
warren0728

that would be awesome....although i'm not sure who eric/jamie are.

do i have to submit a bug report to have them help out?

thanks

Thu, 07/12/2012 - 03:00
ronald
ronald's picture

You can email them directly per haps, but I would first try a bugreport.
Eric, Joe and Jamie are the virtualmin people/developers. Also they can assist to solve your issue way better then I can.

Topic locked