Field notes: The clock that looked right
Right time to the minute, but "System clock synchronized: no". The domain controller answered – and was still rejected.
While troubleshooting a Linux appliance, there was a suspicion that something in it was time-dependent – a certificate, a licence, a token. The first check was, of course, the clock. It showed the right time. That was the start of the problem, not the end.
The symptom
The clock was about 150 milliseconds off after five months of uptime. That looks like a synchronised clock. But timedatectl said otherwise:
System clock synchronized: no
The easy assumption
The NTP server was configured, it was reachable and the clock was right. The natural conclusion is that everything works. But a server being reachable is not the same as the clock being steered by it.
How I isolated it
ntpq -pshowed that the time source – a domain controller – answered every query (reach 377). But no line had the*that means "selected source". The clock wasn't being steered by NTP at all.ntpq -c asshowed why: the source was marked reject.ntpq -rvagainst the source showed a root dispersion of around 10 seconds. ntpd refuses a source whose error margin is larger than 1.5 seconds.
# Example: the source is reachable (reach 377) but no line has * – no selected source $ ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== <time-source> .LOCL. 1 u 12 64 377 0.512 -148.3 2.104 $ ntpq -c as ind assid status conf reach auth condition last_event cnt 1 <id> 9014 yes yes none reject # reject = the source is not used $ ntpq -c "rv <id> rootdisp" rootdisp=10012.345 # the error margin, in milliseconds
The root cause
A classic clash between the Windows Time service and Linux ntpd. The domain controller kept good time, but reported so much uncertainty that the Linux client wouldn't trust it. At the same time, VMware Tools time sync was off. The clock being right was most likely down to a one-off sync from the host every time the backup took a snapshot – not NTP.
Why it matters
A clock kept right by accident stays right until the accident changes – a backup job moved, a snapshot not taken. And the same clash can hit every Linux client pointed at the domain controllers.
The fix
Point Linux clients and network gear at a proper NTP source in the network instead of the domain controllers, and let domain-joined Windows machines keep following the domain hierarchy. Then check on the client that a source is actually selected.
The lesson
The right time is not the same as synchronised time. Don't just check that the source answers – check that it is selected. In ntpq -p, it's the asterisk that counts.