3

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:

enter image description here

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?

6
  • How long has NTP been running? Can you confirm that your Linux box is getting NTP replies from the Internet? What's the output of ntpq -pn on the Linux box? Oct 27, 2011 at 22:48
  • Is this a firewall problem on the debian box?
    – mdpc
    Oct 27, 2011 at 22:55
  • DavidSchwartz: thank you (see answer) mdpc: I ruled out network issues in my question (sniffer showing packets flowing in both directions). Oct 27, 2011 at 23:01
  • Oh, and OpenNTPD does not provide ntpq. Oct 27, 2011 at 23:03
  • Try ntpdc -p that will show what you server is associtaed with and what stratum they are.
    – Squidly
    Oct 27, 2011 at 23:27

3 Answers 3

4

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.

2

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…

1
  • 1
    It is impossible to synchronize two time sources instantaneously. You can make them show the same value at the time you synchronize them, but that does not make them synchronized. ('Synchronized' means operating in unison.) Oct 28, 2011 at 1:04
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .