Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2008 15:34:47 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Nerius Landys <nlandys@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: named and ntpd start order in rc.d
Message-ID:  <77BB50CF-73C4-4A11-9E78-A3FA69D2D890@mac.com>
In-Reply-To: <560f92640812031301m5f51d2c7ia3bcf44454a47820@mail.gmail.com>
References:  <560f92640811211647q551daccnaec4e8085bb8e042@mail.gmail.com> <560f92640812031301m5f51d2c7ia3bcf44454a47820@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77BB50CF-73C4-4A11-9E78-A3FA69D2D890>