named and ntpd start order in rc.d

Chuck Swiger cswiger at
Wed Dec 3 15:53:26 PST 2008

On Dec 3, 2008, at 1:01 PM, Nerius Landys wrote:
[ ... ]
> Does anyone know why I'm getting 2 ntpd processes running after bootup
> (and ntpd fails to adjust the clock as a result)?  Any suggested fix
> would be appreciated.

When ntpd first starts up, it forks a child process to perform DNS  
resolution of the timeservers listed in its config.  If that fails,  
that generally indicates that DNS was not working at the time, or  
something else was going wrong with the network.

[ See ntpd/ntp_config.c, search for fork() or "ntpd_initres". ]

The fix is to make sure that you have a working network and resolver  
available when you try to startup ntpd.  Failing that, you can  
hardcode IP addresses in /etc/ntp.conf, but that's a bad idea for  
anything outside of timeservers which you control.


More information about the freebsd-questions mailing list