[ntp:hackers] DNS Wizard needed

Dave Hart davehart at gmail.com
Sun May 17 09:32:58 UTC 2009

On Sun, May 17, 2009 at 9:20 AM, Hal Murray <hmurray at megapathdsl.net> wrote:
> Context is ntpd on a laptop (XO).  The problem is that the server names in
> the config file aren't ever getting resolved to an IP Address.
> Here is what I think is going on:
> /etc/ntp.conf has server names, not numbers
> System boots.
> NetworkManager starts doing it's thing.
> /etc/resolv.conf is empty
> ntpd gets started.  DNS doesn't work.
>  ntpd puts server names on deferred DNS queue.
> A long time later, I poke something and the network connection gets made.
> /etc/resolv.conf gets updated
> ntpd's DNS resolver still doesn't work.
> I've put all sorts of syslog printout in there.  Everything looks good.
> getaddrinfo returns EAI_AGAIN, -3, Temporary failure in name resolution
> errno is 111/Connection refused
> It works fine if I restart ntpd.
> I'm guessing that the resolver code hasn't noticed that /etc/resolv.conf has
> been updated.  Is there some way I can poke it to get it to look again?

I do not have a suggestion how to convince getaddrinfo() to re-read
resolv.conf, but if you take a look at the source for that function on
your system, perhaps that will yield a clue.

Martin, in your testing on Linux starting ntpd with no network, is
your resolv.conf also initially empty?

Dave Hart

More information about the hackers mailing list