Jump to content

W32time NTP client not applying time


j7n

Recommended Posts

I am trying to use the built-in Windows time client to adjust the time on a Windows Seven computer with a bad CMOS battery that cannot be easily replaced. It is not working. I am now experimenting with the settings on a virtual machine also running Windows Seven to find the correct settings. It is also not working.

Time is kept on a network router running an NTP server. The machine has network up, can ping the router and other computers. Internet is for the machine is blocked on purpose.

I have set the time to the past and tried to correct it. No change to the system clock happened.

I have adjusted the settings of "MaxPosPhaseCorrection" and "MaxNegPhaseCorrection" to accept any time. Neither 0xFFFFFFF (8 years) nor 0x7FFFFFFF worked.

All settings of W32Time

The Event Log reports the time difference received, and says that "valid time data" is being received.

Screenshot of Event Log and current time

Using a 3rd party application called Chameleon Clock allows to correct the time immediately.

Screenshot of Chameleon Clock

The application is a bit of an overkill, old, might not be compatible with Seven, and might crash. I'd rather use the Windows service which is always installed anyway.

I've previously successfully used the time service on Windows XP, and all took to make it working was to increase the permitted PhaseCorrection.

Edit:

I have solved this problem by installing

Meinberg NTP 4.2.4 for Windows

The program has a GUI wizard for setting up the initial configuration and easy to understand documentation. It works with default settings, which include an option to accept any time on startup.

Memory usage is about 850 KB. So far it has worked flawlessly on the real computer.

Some easy to understand documentation for W32Time:

MSDN - Windows Time Service
Sysadmin Lab - Configuring NTP on Windows 2008 R2

If somebody knows how W32Time can be tweaked to work reliably from the start, please post.

Edited by j7n
Link to comment
Share on other sites


Further investigation reveals that manual syncing from the command line w32tm.exe /resync is successful most of the time.

The service does not change time after the initial NTP sync. The time sample is also not compared against MaxPosPhaseCorrection. W32time then proceeds to wait the specified interval, and after the next communication with the server does in fact set the time as expected. It does not matter if the computer has just been booted up, or if only the time service restarted. Clock remains wrong for the duration of SpecialPollInterval.

I tried creating a scheduled task that would run w32tm /resync at boot time and log in, but it failed because of "stale" time data.

Log indicates that after "receiving valid time data" it gives up because "W32TmServiceMain: resync req, irreg already pending". Then later it proceeds to "resync req, irreg now pending" after which time is set. Then it tends to alter between "already pending" and "now pending". I tried with 1 hour interval. 120 seconds also worked but is excessive.

 

 

151118 10:44:52.4375000s - ---------- Log File Opened -----------------151118 10:44:52.4375000s - CurSpc:15625000ns  BaseSpc:15625000ns  SyncToCmos:Yes151118 10:44:52.4375000s - PerfFreq:1571416c/s151118 10:44:52.4375000s - ReadConfig: Found provider 'NtpClient':151118 10:44:52.4375000s - ReadConfig:   'Enabled'=0x00000001151118 10:44:52.4375000s - ReadConfig:   'DllName'='%systemroot%\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'InputProvider'=0x00000001151118 10:44:52.4375000s - ReadConfig: Found provider 'NtpServer':151118 10:44:52.4375000s - ReadConfig:   'Enabled'=0x00000000151118 10:44:52.4375000s - ReadConfig:   'DllName'='%systemroot%\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\system32\w32time.dll'151118 10:44:52.4375000s - ReadConfig:   'InputProvider'=0x00000000151118 10:44:52.4375000s - ReadConfig: Found provider 'VMICTimeProvider':151118 10:44:52.4375000s - ReadConfig:   'Enabled'=0x00000000151118 10:44:52.4375000s - ReadConfig:   'DllName'='%SystemRoot%\System32\vmictimeprovider.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\System32\vmictimeprovider.dll'151118 10:44:52.4375000s - ReadConfig:   'DllName'='C:\Windows\System32\vmictimeprovider.dll'151118 10:44:52.4375000s - ReadConfig:   'InputProvider'=0x00000001151118 10:44:52.4375000s - ReadConfig: 'PhaseCorrectRate'=0x00000007 (2)151118 10:44:52.4375000s - ReadConfig: 'UpdateInterval'=0x00057E40 (2)151118 10:44:52.4375000s - ReadConfig: 'FrequencyCorrectRate'=0x00000004 (2)151118 10:44:52.4375000s - ReadConfig: 'PollAdjustFactor'=0x00000005 (2)151118 10:44:52.4375000s - ReadConfig: 'LargePhaseOffset'=0x02FAF080 (2)151118 10:44:52.4375000s - ReadConfig: 'SpikeWatchPeriod'=0x00000384 (2)151118 10:44:52.4375000s - ReadConfig: 'HoldPeriod'=0x00000005 (2)151118 10:44:52.4375000s - ReadConfig: 'MinPollInterval'=0x0000000A (2)151118 10:44:52.4375000s - ReadConfig: 'MaxPollInterval'=0x00000011 (2)151118 10:44:52.4375000s - ReadConfig: 'AnnounceFlags'=0x0000000A (2)151118 10:44:52.4375000s - ReadConfig: 'LocalClockDispersion'=0x0000000A (2)151118 10:44:52.4375000s - ReadConfig: 'MaxNegPhaseCorrection'=0x7FFFFFFF (2)151118 10:44:52.4375000s - ReadConfig: 'MaxPosPhaseCorrection'=0x7FFFFFFF (2)151118 10:44:52.4375000s - ReadConfig: 'EventLogFlags'=0x00000003 (2)151118 10:44:52.4375000s - ReadConfig: 'MaxAllowedPhaseOffset'=0x00000001 (2)151118 10:44:52.4375000s - ReadConfig: 'TimeJumpAuditOffset'=0x00007080 (2)151118 10:44:52.4375000s - lastClockRate=156250, clockPrecision=-6151118 10:44:52.4375000s - SetTimeSlipNotification succeeds with 0x00000000.151118 10:44:52.4531250s - W32TmServiceMain: RequestNetTopoChangeNotification Succeed151118 10:44:52.4531250s -   DomainHierarchy: LSA role change notification. Redetecting.151118 10:44:52.4531250s - ClockDisciplineThread: Starting: SetUnsync: LI:3 S:0 RDl:0 RDs:0 TSF:0x0  LastUTC:130780151118 10:44:52.4531250s - Starting Providers.151118 10:44:52.4531250s - Starting 'NtpClient', dll:'C:\Windows\system32\w32time.dll'151118 10:44:52.4531250s - LoadLibrary151118 10:44:52.4531250s - NtpTimeProvOpen("NtpClient") called.151118 10:44:52.4531250s - StartNtpProv151118 10:44:52.4531250s - sysPrecision=-6, systmeClockResolution=156250151118 10:44:52.4687500s - NtpProvider: Created 2 sockets (0 listen-only): [::]:123<0x0>, 0.0.0.0:123<0x0>151118 10:44:52.4687500s - StartListeningThread completed!151118 10:44:52.4687500s - PeerPollingThread: waiting forever151118 10:44:52.4687500s - StartPeerPollingThread completed!151118 10:44:52.4687500s - ReadConfig: 'AllowNonstandardModeCombinations'=0x00000001 (2)151118 10:44:52.4687500s - ReadConfig: 'CompatibilityFlags'=0x80000000 (2)151118 10:44:52.4687500s - ReadConfig: 'SpecialPollInterval'=0x00000E10 (2)151118 10:44:52.4687500s - ReadConfig: 'ResolvePeerBackoffMinutes'=0x0000000F (2)151118 10:44:52.4687500s - ReadConfig: 'ResolvePeerBackoffMaxTimes'=0x00000007 (2)151118 10:44:52.4687500s - ReadConfig: 'EventLogFlags'=0x00000003 (2)151118 10:44:52.4687500s - ReadConfig: 'LargeSampleSkew'=0x00000003 (2)151118 10:44:52.4687500s - ReadConfig: 'Type'=NTP (2)151118 10:44:52.4687500s - ReadConfig: 'NtpServer'=192.168.15.254,0x01 (2)151118 10:44:52.4687500s - ReadConfig: 'ManualPeerList'(parsed)='192.168.15.254,0x01'151118 10:44:52.4687500s - AddNewPendingPeer: manual151118 10:44:52.4687500s - StartListeningThread completed!151118 10:44:52.4687500s - PeerPollingThread: waiting 0.000s151118 10:44:52.4687500s - StartPeerPollingThread completed!151118 10:44:52.4687500s - NtpClient started.151118 10:44:52.4687500s - Successfully started 1 providers.151118 10:44:52.4687500s - /--TimeProvider: All providers started151118 10:44:52.4687500s - | Name:NtpClient, Started:1, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\system32\w32time.dll151118 10:44:52.4687500s - >--151118 10:44:52.4687500s - | Total:1, Input: 1, Marked: 0151118 10:44:52.4687500s - \--151118 10:44:52.4687500s - W32TmServiceMain: waiting i16.000s (1024.000s)151118 10:44:52.4687500s - PeerPollingThread: WaitTimeout151118 10:44:52.4687500s - Resolving manual peer: 192.168.15.254,0x01151118 10:44:52.4687500s - Create new peer associations: #1151118 10:44:52.4687500s - Association: (Local) 0.0.0.0:123 => 192.168.15.254:123 (Remote)151118 10:44:52.4687500s - Created reachability group: (151118 10:44:52.4687500s - 192.168.15.254:123,151118 10:44:52.4687500s - )151118 10:44:52.4687500s - PollIntervalChange(): clear: host 0 = max 17 151118 10:44:52.4687500s - PeerPollingThread: waiting 0.000s151118 10:44:52.4687500s - PeerPollingThread: PeerListUpdated151118 10:44:52.4687500s - Reachability: Attempting to contact peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).151118 10:44:52.4687500s - Polling peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)151118 10:44:52.4687500s - Sending packet to 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) in Win2K detect mode, stage 1.151118 10:44:52.4843750s - PollIntervalChange(192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)): reclamp: 17 -> 10 (min=4, max=17, sys=10)151118 10:44:52.4843750s - Peer poll: Max:3600.0000000s (special) Cur:00.0000000s151118 10:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 10:44:52.4843750s - PeerPollingThread: WaitTimeout151118 10:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 10:44:52.4843750s - PeerPollingThread: PeerListUpdated151118 10:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 10:44:52.4843750s - ListeningThread -- DataAvailEvent set for socket 1 (0.0.0.0:123)151118 10:44:52.4843750s - ListeningThread -- response heard from 192.168.15.254:123 <- 192.168.15.30:123151118 10:44:52.4843750s - /-- NTP Packet:151118 10:44:52.4843750s - | LeapIndicator: 0 - no warning;  VersionNumber: 3;  Mode: 4 - Server;  LiVnMode: 0x1C151118 10:44:52.4843750s - | Stratum: 3 - secondary reference (syncd by (S)NTP)151118 10:44:52.4843750s - | Poll Interval: 17 - out of valid range;  Precision: -14 - 61.0352æs per tick151118 10:44:52.4843750s - | RootDelay: 0x0000.0FFBs - 0.0624237s;  RootDispersion: 0x0000.1332s - 0.0749817s151118 10:44:52.4843750s - | ReferenceClockIdentifier: 0x82EB1443 - source IP: 130.235.20.67151118 10:44:52.4843750s - | ReferenceTimestamp:   0xD801E7F3010ACA41 - 13059488371004070900ns - 151151 11:39:31.0040709s151118 10:44:52.4843750s - | OriginateTimestamp:   0xD7D659A478000000 - 13056633892468750000ns - 151118 10:44:52.4687500s151118 10:44:52.4843750s - | ReceiveTimestamp:     0xD801E93433340BEF - 13059488692200012900ns - 151151 11:44:52.2000129s151118 10:44:52.4843750s - | TransmitTimestamp:    0xD801E934338A1400 - 13059488692201325700ns - 151151 11:44:52.2013257s151118 10:44:52.4843750s - >-- Non-packet info:151118 10:44:52.4843750s - | DestinationTimestamp: 151118 10:44:52.4843750s - 0xD7D659A47C000000151118 10:44:52.4843750s -  - 13056633892484375000ns151118 10:44:52.4843750s -  - 151118 10:44:52.4843750s151118 10:44:52.4843750s - | RoundtripDelay: 14312200ns (0s)151118 10:44:52.4843750s - | LocalClockOffset: 2854799724106800ns - 47579:59.724106800s151118 10:44:52.4843750s - \--151118 10:44:52.4843750s - ListeningThread STC:130782151118 10:44:52.4843750s - Peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) is not Win2K. Setting compat flags.151118 10:44:52.4843750s - PollIntervalChange(192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)): peer receive: 0 -> 17151118 10:44:52.4843750s - Peer poll: Max:3600.0000000s (special) Cur:3600.0000000s151118 10:44:52.4843750s - Response from peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123), ofs: +2854799.7241068s151118 10:44:52.4843750s - Logging warning: Time Provider NtpClient: The time sample received from peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) differs from the local time by 2854800 seconds.  The transmission delay from the server was 7 milliseconds. 151118 10:44:52.4843750s - 5 Age:5 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:08.0000000s151118 10:44:52.4843750s - 4 Age:4 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:12.0000000s151118 10:44:52.4843750s - 3 Age:3 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:14.0000000s151118 10:44:52.4843750s - 2 Age:2 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:15.0000000s151118 10:44:52.4843750s - 1 Age:1 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:15.5000000s151118 10:44:52.4843750s - 0 Age:0 Ofs:+2854799.7241068s Dly:+00.0312500s RDly:+00.0624237s Dsp:00.0156861s RDsp:00.0749817s Pnt:00.0000000s Dst:00.0313111s FDsp:07.7500000s151118 10:44:52.4843750s - Reachability:  peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) is reachable.151118 10:44:52.4843750s - Logging information: NtpClient is currently receiving valid time data from 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).** 151118 10:44:52.4843750s - W32TmServiceMain: resync req, irreg already pending.** 151118 10:44:52.4843750s - W32TmServiceMain: waiting i15.984s (1023.984s)** 151118 10:44:52.4843750s - W32TmServiceMain: Network Topology Change** 151118 10:44:52.4843750s - TimeProvCommand([NtpClient], TPC_NetTopoChange) called.** 151118 10:44:52.4843750s - NtpProvider: Network Topology Change151118 10:44:52.4843750s - Reachability:  removing peer 192.168.15.254,0x01  (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).  LAST PEER IN GROUP!151118 10:44:52.4843750s -   Peer (special) now pending: <Name:192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) poll:3600 diff:2130582587 last:130594886922084818 resync?:FALSE>151118 10:44:52.4843750s -   Peers reset: p-p:0 a-p:1 a-x:0151118 10:44:52.4843750s - NtpProvider: Created 2 sockets (0 listen-only): [::]:123<0x0>, 0.0.0.0:123<0x0>151118 10:44:52.4843750s - StartListeningThread completed!151118 10:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 10:44:52.4843750s - StartPeerPollingThread completed!151118 10:44:52.4843750s - W32TmServiceMain: waiting i15.984s (1023.984s)151118 10:44:52.4843750s - W32TmServiceMain: RequestNetTopoChangeNotification Succeed151118 10:44:52.4843750s - PeerPollingThread: PeerListUpdated151118 10:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 10:45:08.4687500s - W32TmServiceMain: timeout151118 10:45:08.4687500s - W32TmServiceMain: waiting 1024.000s151118 11:02:12.4687500s - W32TmServiceMain: timeout151118 11:02:12.4687500s - W32TmServiceMain: waiting 1024.000s151118 11:19:16.4687500s - W32TmServiceMain: timeout151118 11:19:16.4687500s - W32TmServiceMain: waiting 1024.000s151118 11:36:20.4687500s - W32TmServiceMain: timeout151118 11:36:20.4687500s - W32TmServiceMain: waiting 1024.000s151118 11:44:52.4843750s - PeerPollingThread: WaitTimeout151118 11:44:52.4843750s - Resolving manual peer: 192.168.15.254,0x01151118 11:44:52.4843750s - Create new peer associations: #1151118 11:44:52.4843750s - Association: (Local) 0.0.0.0:123 => 192.168.15.254:123 (Remote)151118 11:44:52.4843750s - Created reachability group: (151118 11:44:52.4843750s - 192.168.15.254:123,151118 11:44:52.4843750s - )151118 11:44:52.4843750s - PollIntervalChange(): clear: host 0 = max 17 151118 11:44:52.4843750s - PeerPollingThread: waiting 0.000s151118 11:44:52.4843750s - PeerPollingThread: PeerListUpdated151118 11:44:52.4843750s - Reachability: Attempting to contact peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).151118 11:44:52.4843750s - Polling peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)151118 11:44:52.4843750s - Sending packet to 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) in Win2K detect mode, stage 1.151118 11:44:52.4843750s - PollIntervalChange(192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)): reclamp: 17 -> 10 (min=4, max=17, sys=10)151118 11:44:52.4843750s - Peer poll: Max:3600.0000000s (special) Cur:00.0000000s151118 11:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 11:44:52.4843750s - PeerPollingThread: WaitTimeout151118 11:44:52.4843750s - PeerPollingThread: waiting 3600.000s151118 11:44:52.4843750s - ListeningThread -- DataAvailEvent set for socket 1 (0.0.0.0:123)151118 11:44:52.4843750s - ListeningThread -- response heard from 192.168.15.254:123 <- 192.168.15.30:123151118 11:44:52.4843750s - /-- NTP Packet:151118 11:44:52.4843750s - | LeapIndicator: 0 - no warning;  VersionNumber: 3;  Mode: 4 - Server;  LiVnMode: 0x1C151118 11:44:52.4843750s - | Stratum: 3 - secondary reference (syncd by (S)NTP)151118 11:44:52.4843750s - | Poll Interval: 17 - out of valid range;  Precision: -14 - 61.0352æs per tick151118 11:44:52.4843750s - | RootDelay: 0x0000.121As - 0.0707092s;  RootDispersion: 0x0000.128Ds - 0.072464s151118 11:44:52.4843750s - | ReferenceClockIdentifier: 0x82EB1443 - source IP: 130.235.20.67151118 11:44:52.4843750s - | ReferenceTimestamp:   0xD801F45B010D71B6 - 13059491547004111400ns - 151151 12:32:27.0041114s151118 11:44:52.4843750s - | OriginateTimestamp:   0xD7D667B47C000000 - 13056637492484375000ns - 151118 11:44:52.4843750s151118 11:44:52.4843750s - | ReceiveTimestamp:     0xD801F7444373BD18 - 13059492292263484800ns - 151151 12:44:52.2634848s151118 11:44:52.4843750s - | TransmitTimestamp:    0xD801F74443916BB5 - 13059492292263937700ns - 151151 12:44:52.2639377s151118 11:44:52.4843750s - >-- Non-packet info:151118 11:44:52.4843750s - | DestinationTimestamp: 151118 11:44:52.4843750s - 0xD7D667B47C000000151118 11:44:52.4843750s -  - 13056637492484375000ns151118 11:44:52.4843750s -  - 151118 11:44:52.4843750s151118 11:44:52.4843750s - | RoundtripDelay: -452900ns (0s)151118 11:44:52.4843750s - | LocalClockOffset: 2854799779336200ns - 47579:59.779336200s151118 11:44:52.4843750s - \--151118 11:44:52.4843750s - ListeningThread STC:361182151118 11:44:52.4843750s - Peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) is not Win2K. Setting compat flags.151118 11:44:52.4843750s - PollIntervalChange(192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)): peer receive: 0 -> 17151118 11:44:52.4843750s - Peer poll: Max:3600.0000000s (special) Cur:3600.0000000s151118 11:44:52.4843750s - Response from peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123), ofs: +2854799.7793362s151118 11:44:52.4843750s - Logging warning: Time Provider NtpClient: The time sample received from peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) differs from the local time by 2854800 seconds.  The transmission delay from the server was 0 milliseconds. 151118 11:44:52.5000000s - 5 Age:5 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:08.0000000s151118 11:44:52.5000000s - 4 Age:4 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:12.0000000s151118 11:44:52.5000000s - 3 Age:3 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:14.0000000s151118 11:44:52.5000000s - 2 Age:2 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:15.0000000s151118 11:44:52.5000000s - 1 Age:1 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000004s Dst:16.0000004s FDsp:15.5000000s151118 11:44:52.5000000s - 0 Age:0 Ofs:+2854799.7793362s Dly:+00.0312500s RDly:+00.0707092s Dsp:00.0156860s RDsp:00.0724640s Pnt:00.0000000s Dst:00.0313110s FDsp:07.7500000s151118 11:44:52.5000000s - Reachability:  peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123) is reachable.151118 11:44:52.5000000s - Logging information: NtpClient is currently receiving valid time data from 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).** 151118 11:44:52.5000000s - W32TmServiceMain: resync req, irreg now pending.** 151118 11:44:52.5000000s - W32TmServiceMain: waiting i0.000s (511.968s)** 151118 11:44:52.5000000s - W32TmServiceMain: timeout** 151118 11:44:52.5000000s - Sample Prepared at 130566374925000000 for peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)** 151118 11:44:52.5000000s - NtpClient returned 1 samples.151118 11:44:52.5000000s - Sample 0 offset:+2854799.7793362s delay:+00.1019592s dispersion:07.8381500s151118 11:44:52.5000000s - Intersection successful with 0 dropped samples.151118 11:44:52.5000000s -   0: Sample:0 SyncDist:558891296 SelectDisp:0151118 11:44:52.5000000s - Sample 0 chosen. Select Dispersion:00.0000000s STC:361182151118 11:44:52.5000000s - ClockDispln Update: LastUTC:361182 SO:28547997793362 KPhO:0 *PhO:28547997793362 uT:230402 SD:39190750 LI:0 S:4 RDl:1019592 RDs:78481500 TSF:0x0 Unset->Hold151151 12:44:52.2949612s - ClockDispln Discipline: *SET*TIME* - PhCR:11328570 KPho:28547997793362 (AUDIT)151151 12:44:52.2949612s - ClockDispln Discipline: *SKEW*TIME* - PhCRR:0 CR:156250 PhCR:11328570 UI:360000 phcT:230403 KPhO:0151151 12:44:52.3418362s - Logging information: The time service is now synchronizing the system time with the time source 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123).151151 12:44:52.3418362s - Logging warning: The time service has jumped the local system clock by +2854799 seconds. This occurs when the time source and local system time are far enough apart that clock rate adjustments cannot be made to reach the time specified by the time source.151151 12:44:52.3418362s - TimeProvCommand([NtpClient], TPC_TimeJumped) called.151151 12:44:52.3418362s - W32TmServiceMain: waiting 1024.000s151151 12:44:52.3418362s - W32TmServiceMain: ********** Time Slip Notification **********151151 12:44:52.3418362s - ClockDispln TimeSlip:TimeSlip LastUTC:361187 SetUnsync: LI:3 S:0 RDl:1019592 RDs:78481500 TSF:0x0 ReleaseClock2CMOS151151 12:44:52.3566250s - TimeProvCommand([NtpClient], TPC_TimeJumped) called.151151 12:44:52.3566250s - W32TmServiceMain: waiting i16.000s (1024.000s)151151 12:44:52.3566250s - PeerPollingThread: PeerListUpdated151151 12:44:52.3566250s - Polling peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)151151 12:44:52.3722500s - Peer poll: Max:3600.0000000s (special) Cur:00.0000000s151151 12:44:52.3722500s - PeerPollingThread: waiting 3600.000s151151 12:44:52.3722500s - PeerPollingThread: PeerListUpdated151151 12:44:52.3722500s - PeerPollingThread: waiting 3600.000s151151 12:44:52.4035000s - ListeningThread -- DataAvailEvent set for socket 1 (0.0.0.0:123)151151 12:44:52.4035000s - ListeningThread -- response heard from 192.168.15.254:123 <- 192.168.15.30:123151151 12:44:52.4035000s - /-- NTP Packet:151151 12:44:52.4035000s - | LeapIndicator: 0 - no warning;  VersionNumber: 3;  Mode: 4 - Server;  LiVnMode: 0x1C151151 12:44:52.4035000s - | Stratum: 3 - secondary reference (syncd by (S)NTP)151151 12:44:52.4035000s - | Poll Interval: 10 - 1024s;  Precision: -14 - 61.0352æs per tick151151 12:44:52.4035000s - | RootDelay: 0x0000.121As - 0.0707092s;  RootDispersion: 0x0000.128Ds - 0.072464s151151 12:44:52.4035000s - | ReferenceClockIdentifier: 0x82EB1443 - source IP: 130.235.20.67151151 12:44:52.4035000s - | ReferenceTimestamp:   0xD801F45B010D71B6 - 13059491547004111400ns - 151151 12:32:27.0041114s151151 12:44:52.4035000s - | OriginateTimestamp:   0xD801F7445B4BC6A7 - 13059492292356625000ns - 151151 12:44:52.3566250s151151 12:44:52.4035000s - | ReceiveTimestamp:     0xD801F7445D004EFD - 13059492292363286000ns - 151151 12:44:52.3632860s151151 12:44:52.4035000s - | TransmitTimestamp:    0xD801F7445D1B9FF6 - 13059492292363702800ns - 151151 12:44:52.3637028s151151 12:44:52.4035000s - >-- Non-packet info:151151 12:44:52.4035000s - | DestinationTimestamp: 151151 12:44:52.4035000s - 0xD801F744674BC6A7151151 12:44:52.4035000s -  - 13059492292403500000ns151151 12:44:52.4035000s -  - 151151 12:44:52.4035000s151151 12:44:52.4035000s - | RoundtripDelay: 46458200ns (0s)151151 12:44:52.4035000s - | LocalClockOffset: -16568100ns - 0:00.016568100s151151 12:44:52.4035000s - \--151151 12:44:52.4035000s - ListeningThread STC:361191151151 12:44:52.4035000s - PollIntervalChange(192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)): peer receive: 17 -> 10151151 12:44:52.4035000s - Peer poll: Max:3600.0000000s (special) Cur:3599.9687500s151151 12:44:52.4035000s - Response from peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123), ofs: -00.0165681s151151 12:44:52.4035000s - 5 Age:5 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000024s Dst:16.0000024s FDsp:08.0000000s151151 12:44:52.4035000s - 4 Age:4 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000024s Dst:16.0000024s FDsp:12.0000000s151151 12:44:52.4035000s - 3 Age:3 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000024s Dst:16.0000024s FDsp:14.0000000s151151 12:44:52.4035000s - 2 Age:2 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000024s Dst:16.0000024s FDsp:15.0000000s151151 12:44:52.4035000s - 1 Age:1 Ofs:+00.0000000s Dly:+00.0000000s RDly:+00.0000000s Dsp:16.0000000s RDsp:00.0000000s Pnt:00.0000024s Dst:16.0000024s FDsp:15.5000000s151151 12:44:52.4035000s - 0 Age:0 Ofs:-00.0165681s Dly:+00.0464582s RDly:+00.0707092s Dsp:00.0156865s RDsp:00.0724640s Pnt:00.0000000s Dst:00.0389156s FDsp:07.7500000s** 151151 12:44:52.4035000s - W32TmServiceMain: resync req, irreg already pending.** 151151 12:44:52.4035000s - W32TmServiceMain: waiting i15.953s (1023.953s)** 151151 12:45:08.3566250s - W32TmServiceMain: timeout 151151 12:45:08.3566250s - Sample Prepared at 130594923083566250 for peer 192.168.15.254,0x01 (ntp.m|0x1|0.0.0.0:123->192.168.15.254:123)151151 12:45:08.3566250s - NtpClient returned 1 samples.151151 12:45:08.3566250s - Sample 0 offset:-00.0165681s delay:+00.1171674s dispersion:07.8383351s151151 12:45:08.3566250s - Intersection successful with 0 dropped samples.151151 12:45:08.3566250s -   0: Sample:0 SyncDist:558969188 SelectDisp:0151151 12:45:08.3566250s - Sample 0 chosen. Select Dispersion:00.0000000s STC:361191151151 12:45:08.3566250s - ClockDispln Update: LastUTC:361191 SO:-165681 KPhO:0 PhO:-165681 uT:4 SD:55424744 LI:0 S:4 RDl:1171674 RDs:78483351 TSF:0x0 Unset->Hold151151 12:45:08.3566250s - W32TmServiceMain: waiting 1024.000s151151 13:02:12.3722500s - W32TmServiceMain: timeout
 

I am considering a small 3rd party program now because this is too overcomplicated, starting with the setting names like "phase". The fact that the service doesn't work right away also makes network or setting troubleshooting difficult, because we can't see the result immediately.

Link to comment
Share on other sites

Maybe "stupid" suggestion, but wouldn't it be possible to use a batch to quickly (regedit through a .reg or reg.exe) reduce the SpecialPollInterval value:

http://www.wikihow.com/Change-the-Time-Synchronization-Interval-in-Windows-7

issue a w32tm.exe /resync and then change back to a "more decent" value the SpecialPollInterval ? :unsure:

(additionally stopping/starting the service if required)

 

jaclaz

Link to comment
Share on other sites

Thank you for the reply. I dismissed the possibility of using a batch file early (my bad), because I didn't want a command prompt to become visible. But actually, at least if run from the Task Sheduler, a batch can be executed silently.

 

I have come up with these working solutions.  :thumbup

Set service start type to Manual.

 

SpecialPollingInterval can't be reduced to below about 60 seconds, or else the time isn't applied.

:STARTREM Test for network availability.ping -n 1 192.168.15.254 | find "TTL=" >nulif errorlevel 1 (goto WAIT) else (goto SYNC):WAITping 127.0.0.1 -n 3 >nulgoto START:SYNCreg ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 0x3C /fsc start W32Timeping -n 1 -w 70000 192.168.254.254reg ADD HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 0x1C20 /fsc stop W32Timesc start W32Time
 

 

Ask for a resync a few times. Time becomes available after 8-12 sec. Some resyncs are ineffective because the time is "stale" (whatever that means).

 

:STARTREM Test for network availability.ping -n 1 192.168.15.254 | find "TTL=" >nulif errorlevel 1 (goto WAIT) else (goto SYNC):WAITping 127.0.0.1 -n 3 >nulgoto START:SYNCsc start W32Timeping -n 1 -w 4000 192.168.254.254w32tm /resyncping -n 1 -w 4000 192.168.254.254w32tm /resyncping -n 1 -w 4000 192.168.254.254w32tm /resyncREM sc stop W32Time
 

 

How to wait for network in a batch script when booting on Windows Server?

The WikiHow guide seems to be missing one step that can prevent the time service from starting except when it is run on schedule every week. Windows Time starts/stops at system startup. I ran into this case here as well, where it was stopped due to unavailable network.

Edited by j7n
Link to comment
Share on other sites

Just for the record, if you want to run a batch "invisible" (outside the SCHTASKS/Task Scheduler) there are several dedicated tools (that "hide" the command window), but all in all I find that *anyone* should have among the "base" tools the Nirsoft NIRCMD (that has these feature among a ton of other very useful ones):

http://www.nirsoft.net/utils/nircmd.html

 

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...