Oren Held wrote:
On Wednesday 23 July 2008 16:26, Shachar Shemesh wrote:
I have a strange problem, and it is happening on several servers.
I set up NTP to synchronize, sometimes with a local NTP source (say, a
Windows Server domain controller) and sometime external (the usual ntp
servers). The NTP process is working, and displays the time offset
properly. However, it does not keep the machine synchronized with the
server.
Maybe you already checked that, but just in case you didn't:
*BEFORE* running ntpd, the clock should be more-or-less sync'd (I think - up
to 2min drift). If drift is too high, ntpd won't even try to fix the clock.
They were synced when I ran ntpdate. Even now the difference is about 11
seconds - not enough to cause ntp to not synchronize.
That's why most distros run ntpdate on boot before starting ntpd.
Also paste the ntpq -p output as was already suggested here.
I removed the debian pool servers, and this is now the output:
machine:~# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
dc01.domain.com .LOCL. 1 u - 64 377 0.209 11100.4 2.143
dc02.domain.com 172.16.1.1 2 u 10 64 377 0.211 11093.9 7.942
As you can see, the stratum is low (dc01 reports itself to be stratum 1,
which I find highly unlikely, but it is irrelevant to this discussion).
We know that the machine CAN set its time, because ntpdate does work. We
can see that the difference is all of 11 seconds - should not be enough
to cause ntp to give up.
Here's another interesting piece of trivia, which may be the clue:
machine:~# cat /var/lib/ntp/ntp.drift
19.157
So NTP is trying to set the drift.
Another piece of trivia is that the servers are awfully out of sync with
the real clock. While my local clock (3ms apart from one of the Debian
pool servers) shows 8:58:51 IDT, the server's clock (11 seconds apart
from the domain controller) shows 09:02:10 IDT, which is more than two
minutes apart. Maybe I'm looking for the problem at the wrong place....
Thank you all for trying to help. I'll take it up with the local
sysadmin there.
Shachar