NTP stops working after a few minutes

Started by CJ, April 11, 2021, 09:52:44 PM

Previous topic - Next topic
I noticed recently that my clock was about 15 minutes off.  Looking at my NTP status page all of the peers show "Unreach/Pending".  I stopped the NTP service and ran ntpdate 0.opnsense.pool.ntp.org

When I started the service back up everything seemed fine.  It was syncing with peers and everything was good.  But within a couple of minutes everything went back to the "Unreach/Pending" status.

Given that I'm using the default config and it works correctly for the first few minutes where should I look for more troubleshooting?

Thanks.

Your hardware seems to be unable to keep a proper clock. If the deviations are too large for ntpd to keep up with, it will just give up. Is your installation virtualised?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

No, it's a physical machine.  A Dell Optiplex 7020.

I found this thread about NTP being too fast but mine doesn't seem to drift as quickly.  https://forum.opnsense.org/index.php?topic=18557.0

Do you think the tunable mentioned would fix the issue?

April 11, 2021, 10:47:47 PM #3 Last Edit: April 11, 2021, 11:08:47 PM by pmhausen
Of course. If your clock drift is too high, try other time counters.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks.  That does appear to have fixed the issue.  I wonder why my clock was drifting, though.

NTP is an IPv6 lover. So, if you don't have a working IPv6 connection and you didn't disable IPv6, then it fails to work.
OPNsense HW:

Minisforum Venus series UN100C, 16 GB RAM, 512 GB SSD
T-bao N9N Pro, 16 GB RAM, 512 GB SSD

Quote from: almodovaris on April 12, 2021, 12:11:12 AM
NTP is an IPv6 lover. So, if you don't have a working IPv6 connection and you didn't disable IPv6, then it fails to work.

I'm not sure I follow.  1 of the 4 peers shows up as ipv6 but that doesn't appear to change whether they end up as unreachable or not.

I do have a working ipv6 connection.

Quote from: CJRoss on April 11, 2021, 10:55:03 PM
I wonder why my clock was drifting, though.
Hardware isn't perfect and the FreeBSD kernel clock implementation certainly isn't either. It's just not stable with certain combinations of system and hardware clock used. And it gets worse in virtual machines.

Linux suffers from the same problem. Just the one odd mainboard in one hundred.

Glad it works for you, now.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)