Bugzilla – Bug 163
unable to read nsd.db file when chroot'ed
Last modified: 2007-12-12 16:21:41 CET
 nsd: error: ...stale pid file from process 29939
 nsd: error: unable to load etc/nsd/nsd.db: No such file or directory
my config file is like this;
same config is actually working problem free with chroot commented
2.6.18-8.el5.028stab031.1 #1 SMP Fri Apr 27 20:08:01 MSD 2007 i686 i686 i386 GNU/Linux
tried both make & gmake at compile time
What goes wrong is that NSD chdirs to the zonesdir (/var/named/chroot/var/named) and then tries to open nsd.db.
In the normal case it tries to open /var/named/chroot/etc/nsd/nsd.db
In the chroot case it tries to open etc/nsd/nsd.db
But the last name has no starting / and thus tries to open /var/named/chroot/var/named/etc/nsd/nsd.db which does not exist.
You can solve this by setting
chroot: "/var/named/chroot" # no trailing /
At least, I think so. Does this work you you?
Or by changing the zonesdir to be equal to the chroot directory (which may not be handy for you).
Anyway, this is unexpected behaviour, and I think NSD should not do this.
Thanks for the report, Wouter
actually there is a
it exists in there...
BTW the other dir related things work just fine...
yes it worked, thank you but since all the other related dirs were working it would still be considered a minor bug maybe... :)
Fixed for the upcoming release 3.0.8