From owner-freebsd-bugs@FreeBSD.ORG Sat May 4 20:20:02 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A8F1A7 for ; Sat, 4 May 2013 20:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 018CFE4E for ; Sat, 4 May 2013 20:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r44KK14k065457 for ; Sat, 4 May 2013 20:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r44KK18T065456; Sat, 4 May 2013 20:20:01 GMT (envelope-from gnats) Date: Sat, 4 May 2013 20:20:01 GMT Message-Id: <201305042020.r44KK18T065456@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: =?utf-8?B?SsOBS8OTIEFuZHLDoXM=?= Subject: Re: conf/144804: ntpd(8) cannot resolve hostnames at system start X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?utf-8?B?SsOBS8OTIEFuZHLDoXM=?= List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 May 2013 20:20:02 -0000 The following reply was made to PR conf/144804; it has been noted by GNATS. From: =?utf-8?B?SsOBS8OTIEFuZHLDoXM=?= To: bug-followup@FreeBSD.org, wilson.andrew.j@gmail.com Cc: Subject: Re: conf/144804: ntpd(8) cannot resolve hostnames at system start Date: Sat, 4 May 2013 22:18:54 +0200 I have a very similar problem on 9-STABLE (built yesterday). Messages at boot: May 3 23:31:56 vpn-gw ntpd[715]: ntpd 4.2.4p5-a (1) May 3 23:31:56 vpn-gw ntpd[716]: getaddrinfo: "reggae.eik.bme.hu" invalid host address, ignored May 3 23:31:56 vpn-gw ntpd[716]: getaddrinfo: "swing.eik.bme.hu" invalid host address, ignored May 3 23:31:56 vpn-gw ntpd[716]: getaddrinfo: "jazz.eik.bme.hu" invalid host address, ignored May 3 23:31:57 vpn-gw kernel: re0: link state changed to UP It seems that the problem is the lack of network connectivity, hence the lack of a working resolver (I use recursive DNS servers running on other machines) at ntpd startup. However, ntpq returns the correct IP addresses (maybe it resolves them at the time I run ntpq, I don't know). [goya@vpn-gw /usr/share/doc/ntp]$ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== reggae.eik.bme. .INIT. 16 u - 512 0 0.000 0.000 0.000 swing.eik.bme.h .INIT. 16 u - 512 0 0.000 0.000 0.000 jazz.eik.bme.hu .INIT. 16 u - 512 0 0.000 0.000 0.000 [goya@vpn-gw /usr/share/doc/ntp]$ ntpq -np remote refid st t when poll reach delay offset jitter ============================================================================== 152.66.116.122 .INIT. 16 u - 512 0 0.000 0.000 0.000 152.66.116.124 .INIT. 16 u - 512 0 0.000 0.000 0.000 152.66.116.120 .INIT. 16 u - 512 0 0.000 0.000 0.000 [goya@vpn-gw /usr/share/doc/ntp]$ Running '/etc/rc.d/ntpd restart' later resolves the problem. In the freebsd-stable@ thread http://lists.freebsd.org/pipermail/freebsd-stable/2011-October/064349.html /etc/rc.d/netwait was suggested as a workaround. I found with Google that OpenSUSE uses a much better (IMHO the correct) approach: They have the 'dynamic' keyword for servers defined in ntp.conf, causing ntpd to try to resolve the server's domain name later also, not only at ntpd startup. http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.netz.xntp.html#sec.netz.xntp.dynamic (Don't know whether it's a newer ntpd, or their patched version, or a completly different NTP software.) Regards, AndrĂ¡s