Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RC reports named crashed but it works [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fincoop
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 131

PostPosted: Tue Jan 02, 2018 5:50 pm    Post subject: RC reports named crashed but it works [Solved] Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5588

PostPosted: Tue Jan 02, 2018 7:26 pm    Post subject: Reply with quote

Do you have a valid-looking pidfile in /run/named/, or one inside of the chroot? Should be the latter.
Back to top
View user's profile Send private message
fincoop
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 131

PostPosted: Tue Jan 02, 2018 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5588

PostPosted: Tue Jan 02, 2018 9:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
fincoop
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 131

PostPosted: Tue Jan 02, 2018 9:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5588

PostPosted: Tue Jan 02, 2018 9:23 pm    Post subject: Reply with quote

var/run ought to be a symlink to run, is it?
Back to top
View user's profile Send private message
fincoop
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 131

PostPosted: Tue Jan 02, 2018 9:24 pm    Post subject: Reply with quote

[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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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