Page 1 of 2
Bind dead this morning
Posted: Thu Feb 08, 2007 11:39 am
by kwebdesign
I have a 1and1 server that I've re-built with CentOS 4. This morning, there was an update to bind which yum installed automatically, and now bind won't start up. The error I get when I try to start it is:
Code: Select all
Error in named configuration:
none:0: open: /etc/named.conf: file not found
/etc/named.conf is a link to /var/named/chroot/etc/named.conf, which does exist. There is a named.conf.rpmsave in that directory as well, and I tried replacing named.conf with that file, but it still did not work.
I'm at a loss as to what this error means since the file exists.
Anyone else having a problem with the bind update?
Posted: Thu Feb 08, 2007 11:50 am
by kwebdesign
When I try to start named on my test server (a virtual machine at my house which got the same update), I get the following:
Code: Select all
Starting named: /bin/chown: cannot access `/var/named/run-root/var/named': No such file or directory
But I'm not sure if /var/named/run-root/var/named is supposed to be a file or a directory, or what it's supposed to contain.
Posted: Thu Feb 08, 2007 1:07 pm
by kwebdesign
I tried downgrading to the previous version of bind (downloaded the rpms from the CentOS base repository and forced install), but to no avail - named still won't start.
Posted: Thu Feb 08, 2007 3:42 pm
by kwebdesign
More info:
I've been playing with my test server, which is a Vmware image. Fortunately, I had a recent snapshot and was able to roll back and perform the upgrade a few times to see what was happening.
It appears that the upgrade is moving some files around, and creating new links. I'm not sure yet what is causing the problem, but I'm posting my findings here in case someone else can pick up on something missing (or in case someone else is troubleshooting the same problem).
Before upgrading, /var/named/run-root/etc/ looked like this:
Code: Select all
[root@psa-test ~]# ls -la /var/named/run-root/etc/
total 56
drwxr-xr-x 2 root root 4096 Dec 4 22:25 .
drwxr-xr-x 6 root root 4096 Jun 1 2006 ..
-rw-r--r-- 1 root root 1279 Nov 26 23:22 localtime
-rw-r--r-- 1 root root 3821 Dec 4 22:25 named.conf
-rw-r--r-- 1 root root 3510 Jun 1 2006 named.conf.default
-rw-r--r-- 1 root root 480 Jan 23 2002 rndc.conf
-r--r--r-- 1 root root 1199 Jun 15 2001 rndc.conf.sample
Afterward, it looks like this:
Code: Select all
[root@psa-test ~]# ls -la /var/named/run-root/etc/
total 36
drwxr-xr-x 2 root root 4096 Jan 25 16:54 .
drwxr-xr-x 6 root root 4096 Jun 1 2006 ..
lrwxrwxrwx 1 root root 50 Jan 25 16:54 localtime -> /var/named/chroot/var/named/run-root/etc/localtime
lrwxrwxrwx 1 root root 51 Jan 25 16:54 named.conf -> /var/named/chroot/var/named/run-root/etc/named.conf
lrwxrwxrwx 1 root root 59 Jan 25 16:54 named.conf.default -> /var/named/chroot/var/named/run-root/etc/named.conf.default
lrwxrwxrwx 1 root root 50 Jan 25 16:54 rndc.conf -> /var/named/chroot/var/named/run-root/etc/rndc.conf
lrwxrwxrwx 1 root root 57 Jan 25 16:54 rndc.conf.sample -> /var/named/chroot/var/named/run-root/etc/rndc.conf.sample
Similar changes have happened in /var/named/run-root/var/
If anyone has any insight into what I should be looking for to get this going again, I'd appreciate it.
Me Too
Posted: Thu Feb 08, 2007 3:49 pm
by Crobar_Phil
I'm so glad someone else is dealing with this.
My server is totally screwed right now. PSA won't start because Mysqld won't start, because BIND is borked...
All from the BIND update that Yum pulled in last night.
I'm hoping you find something to fix this soon, I have users screaming bloody murder at me and telling them that a BIND update failed will only get blank stares.
Posted: Thu Feb 08, 2007 4:02 pm
by kwebdesign
It appears to be a problem with bind-chroot conflicting with PSA. I'm still digging, but will post a solution if / when I come up with one.
Posted: Thu Feb 08, 2007 4:06 pm
by kwebdesign
Yes! I'm up and running.
Code: Select all
yum remove bind-chroot
ln -sf /var/named/run-root/etc/named.conf /etc/named.conf
service named restart
Posted: Thu Feb 08, 2007 6:41 pm
by Crobar_Phil
Not me. Running into major issues. Did what you posted and this is what my messages log says:
Code: Select all
Feb 8 17:44:22 named[26887]: starting BIND 9.2.4 -u named -t /var/named/run-root
Feb 8 22:44:22 named[26887]: using 2 CPUs
Feb 8 22:44:22 named[26887]: loading configuration from '/etc/named.conf'
Feb 8 22:44:22 named[26887]: none:0: open: /etc/named.conf: permission denied
Feb 8 22:44:22 named[26887]: loading configuration: permission denied
Feb 8 22:44:22 named[26887]: exiting (due to fatal error)
Feb 8 17:44:22 named: named startup failed
Posted: Thu Feb 08, 2007 11:41 pm
by kwebdesign
Seems to be just a permissions issue. Make sure /var/named/run-root/etc/named.conf and /etc/named.conf are both owned by named.
Code: Select all
chown named:named /var/named/run-root/etc/named.conf
chown named:named /etc/named.conf
Posted: Fri Feb 09, 2007 11:04 am
by scott
Id put this one down as a design flaw on the PSA side. Side note, the whole chroot named-in-plesk thing was my idea. So... my bad. Its supposed to work with the bind-chroot rpm, not against it. Definitely report this one as a bug up to sw-soft.
Posted: Fri Feb 09, 2007 12:48 pm
by kwebdesign
Well, I noticed that bind-chroot is listed as a requirement for Plesk, but I've removed it from my system, so it seems to work without. Maybe they made some changes (or didn't keep it up to date) since you first introduced it.
Do you think I will run into problems down the road due to not having bind-chroot installed?
Posted: Fri Feb 09, 2007 1:05 pm
by Highland
I think the problem is with the stock bind-chroot undoing Plesk's chroot. I removed mine as well and have had no problems with BIND since. I even added it to the ignore of yum.conf to make sure it doesn't happen again.
Posted: Fri Feb 09, 2007 4:26 pm
by scott
Yeah this is why Im so hot on using triggers instead of static rpm's to make changes to the host OS. WIth a trigger you're going to have your configuration actions performed every time associated packages change, getting around this type of scenario.
Posted: Fri May 23, 2008 8:00 am
by Slider
This helped me: I also had to add this line back into /etc/sysconfig/named:
ROOTDIR="/var/named/run-root"
It was removed either by Plesk or uninstalling bind-chroot.
Posted: Sat Jul 12, 2008 8:59 am
by EvolutionCrazy
happened again with the updated of the 25th of june 2008???
had to remove bind-chroot and add ROOTDIR="/var/named/run-root" to the sysconfig/named..... :/