View previous topic :: View next topic |
Author |
Message |
fincoop Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 02 Feb 2004 Posts: 147
|
Posted: Tue Jan 02, 2018 5:50 pm Post subject: RC reports named crashed but it works [Solved] |
|
|
Hello all,
I am having some unusual start/stop behaviour with named, and have for several versions. Currently, 'rc-status' reports named has crashed, but I am able to query the service. When I issue 'rc-service named stop' the command succeeds but named is still running, such that if I start it again, the start will fail and the logs indicate that the server already has socket 53 bound. It seems to be more annoyance than anything at this point, but I'm curious if someone has an idea of where I can investigate to find the root of the problem?
Currently running bind 9.11.1_p3 chrooted
Thanks!
Last edited by fincoop on Tue Jan 02, 2018 9:28 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jan 02, 2018 7:26 pm Post subject: |
|
|
Do you have a valid-looking pidfile in /run/named/, or one inside of the chroot? Should be the latter. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fincoop Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 02 Feb 2004 Posts: 147
|
Posted: Tue Jan 02, 2018 8:02 pm Post subject: |
|
|
Ant P. wrote: | Do you have a valid-looking pidfile in /run/named/, or one inside of the chroot? Should be the latter. |
Thanks for your reply! It looks like I do...
Code: | (root)-(/chroot/dns/var/run/named)-(15:00)
>>> ls -l
total 8
-rw-r--r-- 1 named named 6 Jan 2 12:47 named.pid
-rw------- 1 named named 102 Jan 2 12:47 session.key
(root)-(/chroot/dns/var/run/named)-(15:00)
>>> more named.pid
29414
(root)-(/chroot/dns/var/run/named)-(15:01)
>>> ps ax | grep named
29414 ? Ssl 0:02 /usr/sbin/named -u named -t /chroot/dns
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jan 02, 2018 9:13 pm Post subject: |
|
|
A few other guesses: do you have $PIDFILE set in /etc/conf.d/named, and/or do you have a pid-file defined in named.conf? I'm looking at _get_pidfile() in the initscript and it seems like it can get confused if both are set at the same time. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fincoop Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 02 Feb 2004 Posts: 147
|
Posted: Tue Jan 02, 2018 9:22 pm Post subject: |
|
|
Ant P. wrote: | A few other guesses: do you have $PIDFILE set in /etc/conf.d/named, and/or do you have a pid-file defined in named.conf? I'm looking at _get_pidfile() in the initscript and it seems like it can get confused if both are set at the same time. |
Thanks again, I only have PID in conf.d Code: | (root)-(/etc/conf.d)-(16:18)
>>> grep -i pid named
# Default pid file location
PIDFILE="${CHROOT}/run/named/named.pid"
|
What is interesting though, the config file says /chroot/dns/run/named/ but the file's actual location is /chroot/dns/var/run/named... so that would explain the confusion for sure. Not sure why named is creating the file under /var...
Last edited by fincoop on Tue Jan 02, 2018 9:27 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Jan 02, 2018 9:23 pm Post subject: |
|
|
var/run ought to be a symlink to run, is it? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fincoop Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 02 Feb 2004 Posts: 147
|
Posted: Tue Jan 02, 2018 9:24 pm Post subject: |
|
|
[quote="fincoop"] Ant P. wrote: |
What is interesting though, the config file says /chroot/dns/run/named/ but the file's actual location is /chroot/dns/var/run/named... so that would explain the confusion for sure. Not sure why named is creating the file under /var... |
I created a symlink from /chroot/dns/var/run to /chroot/dns/run, probably a hack but it fixed the problem. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|