[ntp:hackers] DNS Wizard needed

Danny Mayer mayer at ntp.org
Sun May 17 15:25:38 UTC 2009


You must mean me!

Hal Murray 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
> 

getaddrinfo() and friends should not be caching the resolv.conf file
information since those entries can change. I know that in BIND9 it does
not since I worked on fixing some issues in that code.

> 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'll see if I can get hold of the getaddrinfo() code on the XO.
Otherwise I can always contact Jim at OLPC about this. I would expect it
to work correctly, particularly for the environments it's designed for.

Danny


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the hackers mailing list