I want my Windows 7 machine to get its time from my Linux Debian Sid server.
So I want ahead and installed OpenNTPD from the Debian repository. It doesn't listen to anything by default, so I configured it as follows:
listen on 192.168.0.1
server 0.debian.pool.ntp.org
server 1.debian.pool.ntp.org
server 2.debian.pool.ntp.org
server 3.debian.pool.ntp.org
192.168.0.1
being my server's IP address on my LAN. I entered it in the Windows settings and I got this:
I used a network sniffer (Wireshark) to check if this was a network issue. It's not: Windows is happily sending NTP packets and receives responses from my server. I guess Windows is not pleased by the answer it gets from the server. Thing is, I have no idea why…
Here's the result of w32tm /query /verbose /peers
on the Windows machine:
#Peers: 1
Peer: 192.168.0.1,0x9
State: Active
Time Remaining: 604046.2718893s
Mode: 3 (Client)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 10 (1024s)
Last Successful Sync Time: (null)
LastSyncError: 0x80004005 (Unspecified error )
LastSyncErrorMsgId: 0x00000000 (Succeeded)
AuthTypeMsgId: 0x0000005A (NoAuth )
Resolve Attempts: 0
ValidDataCounter: 2
Reachability: 4
"Unspecified error" doesn't help me much. Any idea what's going on here?
Time servers take a couple of samples to make sure they are reading the upstream servers properly and to set their own stratum correctly. It sometimes takes a while. Usually less then 10 minutes.
When you get an error like that you should first check the stratum your NTP server is reporting. There is a limit on how low windows will go to set its time from a NTP server, but I dont recall off the top of my head.
Well, David Schwartz was right: by the time it took me to write my question, my NTP server got synchronized and Windows successfully updated its clock.
Quite frankly, I had no idea I needed to actually wait for it. I thought it was instantaneous. You're good to go when OpenNTPD writes
clock is now synced
to the syslog, not before. Well, good to know.If only the error messages from Windows were a little more explicit…
Time synchronization may not succeed when you try to synchronize with a non-Windows NTP server in Windows Server 2003 http://support.microsoft.com/kb/875424