From owner-freebsd-stable@FreeBSD.ORG Tue Mar 9 10:27:46 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17047106564A for ; Tue, 9 Mar 2010 10:27:46 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 681588FC17 for ; Tue, 9 Mar 2010 10:27:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id o29ARZiV068726; Tue, 9 Mar 2010 21:27:35 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 9 Mar 2010 21:27:35 +1100 (EST) From: Ian Smith To: Dominic Fandrey In-Reply-To: <4B9601D9.5030101@bsdforen.de> Message-ID: <20100309210949.F85436@sola.nimnet.asn.au> References: <4B9601D9.5030101@bsdforen.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-stable@freebsd.org Subject: Re: ntpd does not re-query servers, when a new interface appears X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2010 10:27:46 -0000 On Tue, 9 Mar 2010, Dominic Fandrey wrote: > ntpd tracks interface updates, however it does not requery > servers, when they occur. This was less than an hour ago, > at my university, the notebook boots and is not connected > to anything: > > 9 Mar 08:07:17 ntpd[1510]: logging to file /var/log/ntpd > 9 Mar 08:07:17 ntpd[1510]: precision = 2.234 usec > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #1 wildcard, ::#123 Disabled > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #2 bge0, 192.168.1.12#123 Enabled > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #3 lo0, fe80::1#123 Enabled > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #4 lo0, ::1#123 Enabled > 9 Mar 08:07:17 ntpd[1510]: Listening on interface #5 lo0, 127.0.0.1#123 Enabled > 9 Mar 08:07:17 ntpd[1510]: Listening on routing socket on fd #26 for interface updates > 9 Mar 08:07:17 ntpd[1510]: kernel time sync status 2040 > 9 Mar 08:07:17 ntpd[1510]: frequency initialized 3.155 PPM from /var/db/ntpd.drift > 9 Mar 08:07:20 ntpd[1542]: host name not found: 0.de.pool.ntp.org > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `0.de.pool.ntp.org', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: 1.de.pool.ntp.org > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `1.de.pool.ntp.org', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: 2.de.pool.ntp.org > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `2.de.pool.ntp.org', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: ntp1.rz.uni-karlsruhe.de > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `ntp1.rz.uni-karlsruhe.de', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: ntp1.rz.uni-karlsruhe.de > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `ntp1.rz.uni-karlsruhe.de', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: ntp3.rz.uni-karlsruhe.de > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `ntp3.rz.uni-karlsruhe.de', giving up on it > 9 Mar 08:07:20 ntpd[1542]: host name not found: ntp4.rz.uni-karlsruhe.de > 9 Mar 08:07:20 ntpd[1542]: couldn't resolve `ntp4.rz.uni-karlsruhe.de', giving up on it > > So ntpd has given up on all the servers listed in the ntp.conf file. Yes, but it looks more like name service that's not operating, ntpd seems to be doing its best but can't resolve the hostnames? > I then proceed to connect to the wireless network and proceed to log > into two VPNs: > > 9 Mar 08:08:58 ntpd[1510]: Listening on interface #6 wlan0, 192.168.75.58#123 Enabled > 9 Mar 08:09:00 ntpd[1510]: Listening on interface #7 tun0, 193.196.120.15#123 Enabled > 9 Mar 08:09:04 ntpd[1510]: Listening on interface #8 tun1, 141.3.162.67#123 Enabled > > Over interface #8 some of the servers are actually available, but > ntpq -p still states: > No association ID's returned > > Only when I restart ntpd, it operates as expected: > remote refid st t when poll reach delay offset jitter > ============================================================================== > zit-net2.uni-pa .STEP. 16 u - 512 0 0.000 0.000 0.000 > alpha.rueckgr.a .STEP. 16 u - 512 0 0.000 0.000 0.000 > ntp.goneco.de .STEP. 16 u - 512 0 0.000 0.000 0.000 > +proxy4.rz.uni-k 129.13.64.17 2 u 30 128 271 2.937 2.530 1.891 > +proxy2.rz.uni-k 129.13.64.17 2 u 58 128 375 3.593 -8.981 1.837 > *proxy1.rz.uni-k 129.13.64.17 2 u 15 128 271 3.297 8.244 1.487 I've always had to restart named after losing / regaining an interface, most noticeably after a suspend/resume (eg a low battery suspend), so I run /etc/rc.d/named restart from rc.resume. This looks like a similar issue perhaps, though I don't see why restarting only ntpd would fix it. HTH, Ian