conf/144804: ntpd cannot resolve hostnames at system start

Andrew Wilson wilson.andrew.j at gmail.com
Thu Mar 18 18:40:03 UTC 2010


The following reply was made to PR conf/144804; it has been noted by GNATS.

From: Andrew Wilson <wilson.andrew.j at gmail.com>
To: =?KOI8-R?B?88HOxcsg59XSyc4=?= <agurin at mail.ru>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: conf/144804: ntpd cannot resolve hostnames at system start
Date: Thu, 18 Mar 2010 13:04:17 -0500

 2010/3/18 =F3=C1=CE=C5=CB =E7=D5=D2=C9=CE <agurin at mail.ru>:
 >> Number: =9A =9A =9A =9A 144804
 >> >Category: =9A =9A =9A conf
 >> >Synopsis: =9A =9A =9A ntpd cannot resolve hostnames at system start
 >> >Confidential: =9A no
 >> >Severity: =9A =9A =9A non-critical
 >> >Priority: =9A =9A =9A low
 >> >Responsible: =9A =9Afreebsd-bugs
 >> >State: =9A =9A =9A =9A =9Aopen
 >> >Quarter:
 >> >Keywords:
 >> >Date-Required:
 >> >Class: =9A =9A =9A =9A =9Asw-bug
 >> >Submitter-Id: =9A current-users
 >> >Arrival-Date: =9A Tue Mar 16 20:10:00 UTC 2010
 >> >Closed-Date:
 >> >Last-Modified:
 >> >Originator: =9A =9A andy wilson
 >> >Release: =9A =9A =9A =9A8.0-RELEASE-p2
 >> >Organization:
 >> >Environment:
 > FreeBSD urania.tx.net 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #1: Wed Mar 1=
 0 13:27:38 CST 2010 =9A =9A root at urania.tx.net:/usr/obj/usr/src/sys/URANIA =
 =9Ai386
 >> >Description:
 >
 > Due to network initialization taking longer at system startup on 8.0, ntp=
 d cannot resolve hostnames when it is run by /etc/rc.d/ntpd
 >
 >
 > It spits out some messages that look something like:
 >
 > ntpd_initres[1469]: host name not found: time.nist.gov
 > ntpd_initres[1469]: couldn't resolve `time.nist.gov', giving up on it
 > ntpd_initres[1469]: host name not found: time-b.nist.gov
 > ntpd_initres[1469]: couldn't resolve `time-b.nist.gov', giving up on it
 > ntpd_initres[1469]: host name not found: time-c.timefreq.bldrdoc.gov
 > ntpd_initres[1469]: couldn't resolve `time-c.timefreq.bldrdoc.gov', givin=
 g up on it
 >
 >
 > In this state ntpd isn't very useful until it is restarted after the netw=
 ork is ready to go.
 >
 >
 >
 > # ntpq -p
 > No association ID's returned
 > # /etc/rc.d/ntpd restart
 > Stopping ntpd.
 > Starting ntpd.
 > # ntpq -p
 > =9A =9A remote =9A =9A =9A =9A =9A refid =9A =9A =9Ast t when poll reach =
 =9A delay =9A offset =9Ajitter
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D
 > =9Atime.nist.gov =9A .ACTS. =9A =9A =9A =9A =9A 1 u =9A =9A3 =9A 64 =9A =
 =9A1 =9A 40.103 =9A-20.364 =9A 0.004
 > =9Atime-b.nist.gov .ACTS. =9A =9A =9A =9A =9A 1 u =9A =9A2 =9A 64 =9A =9A=
 0 =9A =9A0.000 =9A =9A0.000 =9A 0.000
 > =9Atime-C.timefreq .ACTS. =9A =9A =9A =9A =9A 1 u =9A =9A1 =9A 64 =9A =9A=
 1 =9A 40.769 =9A-20.209 =9A 0.004
 > =9Anist1.symmetric .ACTS. =9A =9A =9A =9A =9A 1 u =9A =9A1 =9A 64 =9A =9A=
 1 =9A 67.883 =9A-11.069 =9A 0.004
 >
 >
 >
 >> >How-To-Repeat:
 >
 > Configure time servers by hostname in /etc/ntp.conf, set ntpd_enable=3D"Y=
 ES" in rc.conf and reboot.
 >
 >
 >> >Fix:
 >
 >
 >> >Release-Note:
 >> >Audit-Trail:
 >> >Unformatted:
 >
 > this bug occurs when your system configured to use a dns server on the sa=
 me system. When a system is starting, the ntpd starts before the named.
 >
 
 The problem isn't limited to named; it occurs whether running named as
 a local resolver or setting a remote resolver in /etc/resolv.conf
 
 The problem in both cases is that network connectivity doesn't exist
 yet so name resolution fails when ntpd is started. The network
 interfaces are configured early on in the rc order, but it still takes
 about 20 seconds before packets can actually be sent (this quirk is
 new to FreeBSD 8). Any attempts to resolve hostnames before packets
 can be sent will fail. ntpd assumes that you have a working resolver
 when it is started.


More information about the freebsd-bugs mailing list