conf/144804: ntpd(8) cannot resolve hostnames at system start
JÁKÓ András
jako.andras at eik.bme.hu
Sat May 4 20:20:02 UTC 2013
The following reply was made to PR conf/144804; it has been noted by GNATS.
From: =?utf-8?B?SsOBS8OTIEFuZHLDoXM=?= <jako.andras at eik.bme.hu>
To: bug-followup at FreeBSD.org, wilson.andrew.j at 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 at 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 at 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 at 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
More information about the freebsd-bugs
mailing list