From owner-freebsd-questions@FreeBSD.ORG Sat Feb 17 07:18:12 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4953C16A406 for ; Sat, 17 Feb 2007 07:18:12 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id AD05013C441 for ; Sat, 17 Feb 2007 07:18:10 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with SMTP id SAA06132; Sat, 17 Feb 2007 18:18:06 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sat, 17 Feb 2007 18:18:06 +1100 (EST) From: Ian Smith To: freebsd-questions@freebsd.org In-Reply-To: <20070216222907.B616D16A4CB@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Giorgos Keramidas , Andrea Venturoli Subject: Re: named already running? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2007 07:18:12 -0000 In freebsd-questions Digest, Vol 165, Issue 19 At Message: 33 On Sat, 17 Feb 2007 00:28:13 +0200 Giorgos Keramidas wrote: > On 2007-02-16 22:56, Andrea Venturoli wrote: > > Hello. > > > > I'm getting this on several different 6.x servers: > > > > > # sh /etc/rc.d/named restart > > > Stopping named. > > > named already running? (pid=xxx). > > > > and named won't restart; if I then > > > > > # sh /etc/rc.d/named start > > > Starting named. > > > > it works fine. > > > > Is this happening to other people? What could be the reason? > > It's nothing critical, only a bit annoying, but I'm curious... > > yes. I've seen it happen too. I think it's a timing issue between the > process going away and the new named trying to start. I haven't tried > to find the *real* cause of this, but it may be worth filing a problem > report, even if it's not a critical bug :) I've run into this one. /etc/rc.d/named stop runs 'rndc stop' and start runs first named_precmd which handles the chroot stuff and sets up rndc. however rndc itself says (edited for relevance): gaia# rndc Usage: rndc [-c config] [-s server] [-p port] [-k key-file ] [-y key] [-V] command command is one of the following: reload Reload configuration file and zones. [..] reconfig Reload configuration file and new zones only. stats Write server statistics to the statistics file. querylog Toggle query logging. dumpdb [-all|-cache|-zones] [view ...] Dump cache(s) to the dump file (named_dump.db). stop Save pending updates to master files and stop the server. [..] status Display status of the server. recursing Dump the queries that are currently recursing (named.recursing) *restart Restart the server. <<<<<<<<<<<<<<<<<< * == not yet implemented <<<<<<<<<<<<<<<<<< Version: 9.3.2-P2 So 'rncd restart' doesn't (yet) work the same as the older ndc restart; you have to use 'rncd stop; rndc start' instead, or more consistently: /etc/rc.d/named stop /etc/rc.d/named start .. which works fine, but does blow away all cached data :( I have to do this every time after resuming my suspended laptop, as named loses its binding to any IP but localhost, after resuming the LAN pccard .. I guess it can be argued that a nameserver should never be suspended :) (As an aside, rndc stats and rndc dumpdb work here, but I can't get rndc querylog to do anything at all, a write permission error. I've tried all manner of things including creating a zero length named.run in various places under the chroot .. no dice. I'll try it again after building the latest 5.5-STABLE, which has bind 9.3.4 as I recall, but I suspect querylog might need patching to work in a chroot environment) Cheers, Ian