View previous topic :: View next topic |
Author |
Message |
petrjanda Veteran
Joined: 05 Sep 2003 Posts: 1557 Location: Brno, Czech Republic
|
Posted: Sun Oct 30, 2005 5:02 am Post subject: Chrooted named wont be stopped |
|
|
Something very funny going on here. "/etc/init.d/named" starts the named daemon, but "/etc/init.d/named stop" fails to stop it. I KNOW named is running via ps -aux. While investigating, i found 2 ways to stop it.
First way:
killall named
/etc/init.d/named zap
Second way:
Edit /chroot/dns/etc/bind/named.conf, the line that says location of the pid file, change it from /var/run/named/named.conf to /chroot/dns/var/run/named/named.conf and then stop it normally. But before you start it again change to the original pid file location. It seems like the initscript seek the pid file in the REAL /var/run/named location instead of the chrooted one (/chroot/dns/var/run/named).
Has one got a REAL fix for this? _________________ There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta |
|
Back to top |
|
|
WladyX Guru
Joined: 25 Nov 2004 Posts: 503 Location: Romania
|
Posted: Sun Oct 30, 2005 10:26 am Post subject: |
|
|
Just upgraded bind, same issue, resolved by:
Code: |
ln -s /chroot/dns/var/run/named/named.pid /var/run/named/
|
_________________ We are not alone. |
|
Back to top |
|
|
r1 n00b
Joined: 07 Jul 2005 Posts: 13
|
Posted: Sun Oct 30, 2005 10:11 pm Post subject: |
|
|
Hi,
2 ways to solve this,
1) put your chrooted path to your pid-file in named.conf
for example change
pid-file "/var/run/named/named.pid";
by
pid-file "/[YOUR_CHROOT_PATH]/named.pid";
2) change the init.d/named file with this
# as suggested in bug #107724
PIDFILE=$(\
egrep -v \
"^([[:cntrl:] ]+(#|//|/\*)|(#|//|/\*))" \
${CHROOT}/etc/bind/named.conf \
| egrep -o -m1 "pid\-file +\".+\" *;" \
| cut -d\" -f2
)
by
# as suggested in bug #107724
PIDFILE=${CHROOT}$(\
egrep -v \
"^([[:cntrl:] ]+(#|//|/\*)|(#|//|/\*))" \
${CHROOT}/etc/bind/named.conf \
| egrep -o -m1 "pid\-file +\".+\" *;" \
| cut -d\" -f2
)
r1.
diff for init.d/named
25c25
< PIDFILE=$(\
---
> PIDFILE=${CHROOT}$(\ |
|
Back to top |
|
|
petrjanda Veteran
Joined: 05 Sep 2003 Posts: 1557 Location: Brno, Czech Republic
|
Posted: Mon Oct 31, 2005 3:43 am Post subject: |
|
|
WladyX wrote: | Just upgraded bind, same issue, resolved by:
Code: |
ln -s /chroot/dns/var/run/named/named.pid /var/run/named/
|
|
heh, thats what i did too (but put it in /etc/init.d/named). A post above is a superior solution though. Thanks all! _________________ There is, a not-born, a not-become, a not-made, a not-compounded. If that unborn, not-become, not-made, not-compounded were not, there would be no escape from this here that is born, become, made and compounded. - Gautama Siddharta |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|