ntpd hangs on boot but works afterwards

Scott Gasch scott.gasch at gmail.com
Sat Jan 26 22:01:49 UTC 2019


I have a system I recently upgraded to FreeBSD 12 and started getting a
weird problem with ntpd.  What happens is, on boot, rc.ntpd seems to hang
requiring me to go to the console and hit ^C.  When I do so it says
something like "/etc/rc.d/ntpd interrupted" and continues to boot
successfully (including starting sshd later in the process and letting me
ssh into the machine).

When I ssh in, ntpd is not running.  If I just do a /etc/rc.d/ntpd start at
that point it works just fine as does a service ntpd start.

I am setting the ntpd_sync_on_start rc variable and I do see the -g option
on the ntpd process when it starts.  The machine clock should be pretty
close to the actual time... so I don't suspect this is due to a huge clock
skew.  It does seem like the network is up and running by the time it hangs
-- I see some DHCP messages earlier in the boot process making me believe
that we have an IP address and should not be stuck trying to talk to the
ntp peers.

Does anyone have ideas or seen this before?  Thanks in advance.

Here are some relevant configs:

# *uname -a*
FreeBSD wannabe 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC  amd64

# *grep ntp rc.conf*

# *cat ntp.conf | grep -v "^#"*
server     # local clock
fudge stratum 10
server 0.us.pool.ntp.org iburst
server 1.us.pool.ntp.org
server ntp.ucsd.edu
server ns.nts.umn.edu
server 0.freebsd.pool.ntp.org iburst
server 1.freebsd.pool.ntp.org

restrict default limited kod nomodify notrap nopeer noquery
restrict mask nomodify notrap
restrict -6 default limited kod nomodify notrap nopeer noquery
restrict -6 ::1

driftfile /var/lib/ntp/ntp.drift
leapfile "/var/db/ntpd.leap-seconds.list"

More information about the freebsd-questions mailing list