Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows时间服务赢得';不同步_Windows_Synchronization_Windows Services_Wireshark_Ntp - Fatal编程技术网

Windows时间服务赢得';不同步

Windows时间服务赢得';不同步,windows,synchronization,windows-services,wireshark,ntp,Windows,Synchronization,Windows Services,Wireshark,Ntp,我在这里发布我的问题是因为即使我读了所有的文章来解决这个问题,w32tm仍然会在尝试将计算机时间与本地NTP服务器(这是一个PLC)同步时给我相同的错误消息 下面是对情况的快速解释: 我们有一台安装了“Windows 10 IoT Enterprise 2019”映像的PC,该映像必须与客户PLC的时钟同步 我们正在尝试使用w32tm(Windows时间服务),因为它必须可以通过控制台命令进行参数化,控制台命令将通过网页进行交互 每次尝试进行w32tm/重新同步时,都会出现以下错误:“计算机没有

我在这里发布我的问题是因为即使我读了所有的文章来解决这个问题,w32tm仍然会在尝试将计算机时间与本地NTP服务器(这是一个PLC)同步时给我相同的错误消息

下面是对情况的快速解释:

我们有一台安装了“Windows 10 IoT Enterprise 2019”映像的PC,该映像必须与客户PLC的时钟同步

我们正在尝试使用w32tm(Windows时间服务),因为它必须可以通过控制台命令进行参数化,控制台命令将通过网页进行交互

每次尝试进行w32tm/重新同步时,都会出现以下错误:“计算机没有重新同步,因为没有可用的时间数据”,即使我们使用/force或/nowait参数。

如果我们检查此服务的日志,我们会发现此错误似乎删除了收到的数据包:

“数据包测试6失败(非同步或自上次同步以来的间隔不正确)。-忽略从172.28.134.229,0x8(ntp.m | 0x8 | 0.0.0.0:123->172.28.134.229:123)测试失败的数据包。”

我可以ping PLC,如果我们使用一个外部同步工具,使用他自己的服务而不是Windows Time,它工作得很好(但如前所述,我们必须将此NTP设置与console命令接口,因此这不是一个好的最终解决方案)

我们使用Wireshark读取PLC和PC之间的所有数据包交换。问题是数据包与使用的工具(w32tm或外部工具)无关。这始终是相同的数据包内容,使用正确的时间戳等

以下是我尝试过的多种解决方案:

  • 正在检查Windows Time-->的组策略,它们都处于启用状态“未配置”

  • 防火墙未阻止任何NTP数据包(端口123)

  • 所有这些命令:

净停止W32时间 w32tm/取消注册 reg add HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider/v Enabled/t reg\U dword/d0 w32tm/寄存器 网络启动W32时间 w32tm/config/manualpeerlist:“172.28.134.229,0x8”/syncfromflags:manual/reliable:yes/update w32tm/再同步 净停止W32时间 网络启动W32时间 w32tm/再同步

我尝试了所有的标志“0x1、0x4、0x8、0x9”,甚至删除了引号

我还尝试:

w32tm/config/syncfromflags:domhier/update

w32tm/再同步

我检查了寄存器(regedit)的参数,它们被设置为具有正确IP地址的NTP

我也尝试过NT5DS和“NoSync”,但没有成功

以下是使用w32tm/query命令读取的配置:

以下是来自w32tm的日志:

我从几周前就一直在努力解决这个问题,你知道如何解决这个问题吗

这是此应用程序的一个非常重要的功能,如果这不起作用,我们将无法向客户提供PC

提前感谢您的回复

致以最良好的祝愿

C:\Windows\system32>w32tm.exe /config /syncfromflags:manual /manualpeerlist:172.28.134.229,0x8 /reliable:yes /update
The command completed successfully.


C:\Windows\system32>w32tm /query /peers
#Peers: 1

Peer: 172.28.134.229,0x8
State: Active
Time Remaining: 990.8006238s
Mode: 3 (Client)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 10 (1024s)


C:\Windows\system32>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 1 (primary reference - syncd by radio clock)
Precision: -23 (119.209ns per tick)
Root Delay: 0.0000000s
Root Dispersion: 10.0000000s
ReferenceId: 0x4C4F434C (source name:  "LOCL")
Last Successful Sync Time: 23/04/2021 13:59:08
Source: Local CMOS Clock
Poll Interval: 10 (1024s)


C:\Windows\system32>w32tm /query /configuration
[Configuration]

EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 10 (Local)
MaxPollInterval: 15 (Local)
MaxNegPhaseCorrection: 54000 (Local)
MaxPosPhaseCorrection: 54000 (Local)
MaxAllowedPhaseOffset: 1 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 1 (Local)
UpdateInterval: 360000 (Local)


[TimeProviders]

NtpClient (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 1 (Local)
InputProvider: 1 (Local)
AllowNonstandardModeCombinations: 1 (Local)
ResolvePeerBackoffMinutes: 15 (Local)
ResolvePeerBackoffMaxTimes: 7 (Local)
CompatibilityFlags: 2147483648 (Local)
EventLogFlags: 1 (Local)
LargeSampleSkew: 3 (Local)
SpecialPollInterval: 32768 (Local)
Type: NTP (Local)
NtpServer: 172.28.134.229,0x8 (Local)

NtpServer (Local)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Local)
Enabled: 0 (Local)
InputProvider: 0 (Local)



C:\Windows\system32>w32tm /resync
Sending resync command to local computer
The computer did not resync because no time data was available.
153514 12:12:08.7993597s - | OriginateTimestamp:   0xE42D3818CB35B91F - 13263653528793788500ns - 153514 12:12:08.7937885s
153514 12:12:08.7993921s - | ReceiveTimestamp:     0xE42D3819170A3D70 - 13263653529090000000ns - 153514 12:12:09.0900000s
153514 12:12:08.7994267s - | TransmitTimestamp:    0xE42D3819170A3D70 - 13263653529090000000ns - 153514 12:12:09.0900000s
153514 12:12:08.7994635s - >-- Non-packet info:
153514 12:12:08.7994818s - | DestinationTimestamp: 153514 12:12:08.7994963s - 0xE42D3818CBCBBA7E153514 12:12:08.7995103s -  - 13263653528796077400ns153514 12:12:08.7995263s -  - 153514 12:12:08.7960774s
153514 12:12:08.7995467s - | RoundtripDelay: 2288900ns (0s)
153514 12:12:08.7995746s - | LocalClockOffset: 295067000ns - 0:00.295067000s
153514 12:12:08.8015152s - \--
153514 12:12:08.8020609s - ListeningThread STC:717682
153514 12:12:08.8021869s - Packet test 6 failed (not syncd or bad interval since last sync).
153514 12:12:08.8022403s - Ignoring packet that failed tests from 172.28.134.229,0x8 (ntp.m|0x8|0.0.0.0:123->172.28.134.229:123).
153514 12:12:23.2930188s - W32TmServiceMain: timeout
153514 12:12:23.2937795s - Sample Prepared at 132636535432937200 for peer 172.28.134.229,0x8 (ntp.m|0x8|0.0.0.0:123->172.28.134.229:123)
153514 12:12:23.2938670s - ** NTP sample vector is empty.
153514 12:12:23.2939470s - No new NTP sample is available.
153514 12:12:23.2940151s - UpdateTimerQueue1: TN:112282810000::: LRT:104334530000  LUT:112122810000 LAFLTNS:160000000 TSLGT:160006702 LTNS:864000000000
153514 12:12:23.2940663s - W32TmServiceMain: waiting 1024.000s
153514 12:12:23.2941588s - Triggering re-read of configuration
153514 12:12:23.2950225s - RPC Call - Query Status
153514 12:12:23.2950599s - W32TmServiceMain: Param change notification
153514 12:12:23.2951580s - RPC Call - Query Configuration
153514 12:12:23.2952419s - RPC Call - Query Provider Configuration
153514 12:12:23.2952967s - TimeProvCommand([NtpClient], TPC_Query) called.
153514 12:12:23.2953598s - RPC Call - Query Provider Configuration
153514 12:12:23.2960078s - ReadConfig: Found provider 'NtpClient':
153514 12:12:23.2972157s - ReadConfig:   'InputProvider'=0x00000001
153514 12:12:23.2973229s - ReadConfig:   'MetaDataProvider'=0x00000000
153514 12:12:23.2973894s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2974384s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2974854s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2975555s - ReadConfig: Found provider 'NtpServer':
153514 12:12:23.2976585s - ReadConfig:   'InputProvider'=0x00000000
153514 12:12:23.2977217s - ReadConfig:   'MetaDataProvider'=0x00000000
153514 12:12:23.2977861s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2978341s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2978805s - ReadConfig:   'DllName'='C:\Windows\SYSTEM32\w32time.DLL'
153514 12:12:23.2979806s - ReadConfig: Found provider 'VMICTimeProvider':
153514 12:12:23.2980822s - ReadConfig:   'InputProvider'=0x00000001
153514 12:12:23.2981444s - ReadConfig:   'MetaDataProvider'=0x00000000
153514 12:12:23.2982194s - ReadConfig:   'DllName'='C:\Windows\System32\vmictimeprovider.dll'
153514 12:12:23.2984498s - ReadConfig:   'DllName'='C:\Windows\System32\vmictimeprovider.dll'
153514 12:12:23.2985230s - ReadConfig:   'DllName'='C:\Windows\System32\vmictimeprovider.dll'
153514 12:12:23.2988793s - ReadConfig: 'PhaseCorrectRate'=0x00000001 (2)
153514 12:12:23.2989981s - ReadConfig: 'UpdateInterval'=0x00057E40 (2)
153514 12:12:23.2990612s - ReadConfig: 'FrequencyCorrectRate'=0x00000004 (2)
153514 12:12:23.2991230s - ReadConfig: 'PollAdjustFactor'=0x00000005 (2)
153514 12:12:23.2991877s - ReadConfig: 'LargePhaseOffset'=0x02FAF080 (2)
153514 12:12:23.2992474s - ReadConfig: 'SpikeWatchPeriod'=0x00000384 (2)
153514 12:12:23.2993069s - ReadConfig: 'HoldPeriod'=0x00000005 (2)
153514 12:12:23.2993674s - ReadConfig: 'MinPollInterval'=0x0000000A (2)
153514 12:12:23.2994285s - ReadConfig: 'MaxPollInterval'=0x0000000F (2)
153514 12:12:23.2994909s - ReadConfig: 'ClockHoldoverPeriod'=0x0000C350 (2)
153514 12:12:23.2995529s - ReadConfig: 'AnnounceFlags'=0x00000005 (2)
153514 12:12:23.2996139s - ReadConfig: 'LocalClockDispersion'=0x0000000A (2)
153514 12:12:23.2996766s - ReadConfig: 'MaxNegPhaseCorrection'=0x0000D2F0 (2)
153514 12:12:23.2997412s - ReadConfig: 'MaxPosPhaseCorrection'=0x0000D2F0 (2)
153514 12:12:23.2998337s - ReadConfig: 'EventLogFlags'=0x00000002 (2)
153514 12:12:23.2998984s - ReadConfig: 'MaxAllowedPhaseOffset'=0x00000001 (2)
153514 12:12:23.2999717s - ReadConfig: 'UtilizeSslTimeData'=0x00000001 (2)
153514 12:12:23.3000346s - ReadConfig: 'ClockAdjustmentAuditLimit'=0x00000320 (2)
153514 12:12:23.3000988s - ReadConfig: 'TimeJumpAuditOffset'=0x00007080 (2)
153514 12:12:23.3001792s - Clock adjustment info: dwCurrentSecPerTick: 156250 dwDefaultSecPerTick: 156250 bSyncToCmosDisabled:1
153514 12:12:23.3002293s - PerfFreq:10000000c/s
153514 12:12:23.3002816s - currAdj:10000000 Incr:10000000 IncrEnabled:1
153514 12:12:23.3017975s -   No params changed for local clock.
153514 12:12:23.3018766s - /--TimeProvider: new enabled provider list
153514 12:12:23.3019546s - | Name:NtpClient, Started:0, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3020198s - | Name:VMICTimeProvider, Started:0, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\System32\vmictimeprovider.dll
153514 12:12:23.3020668s - >--
153514 12:12:23.3021157s - | Total:2, Input: 2, Marked: 0
153514 12:12:23.3021618s - \--
153514 12:12:23.3022097s - /--TimeProvider: Parameter change before list is updated
153514 12:12:23.3022637s - | Name:NtpClient, Started:1, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3023098s - >--
153514 12:12:23.3023578s - | Total:1, Input: 1, Marked: 0
153514 12:12:23.3024034s - \--
153514 12:12:23.3024507s - /--TimeProvider: new disabled provider list
153514 12:12:23.3025036s - | Name:NtpServer, Started:0, Input:0, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3025495s - >--
153514 12:12:23.3025973s - | Total:1, Input: 0, Marked: 0
153514 12:12:23.3026427s - \--
153514 12:12:23.3026901s - /--TimeProvider: Parameter change before list is updated
153514 12:12:23.3027435s - | Name:NtpServer, Started:0, Input:0, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3027910s - >--
153514 12:12:23.3028391s - | Total:1, Input: 0, Marked: 0
153514 12:12:23.3028853s - \--
153514 12:12:23.3029456s - TimeProvCommand([NtpClient], TPC_UpdateConfig) called.
153514 12:12:23.3035085s - ReadConfig: 'AllowNonstandardModeCombinations'=0x00000001 (2)
153514 12:12:23.3035803s - ReadConfig: 'CompatibilityFlags'=0x80000000 (2)
153514 12:12:23.3036445s - ReadConfig: 'SpecialPollInterval'=0x00008000 (2)
153514 12:12:23.3037071s - ReadConfig: 'ResolvePeerBackoffMinutes'=0x0000000F (2)
153514 12:12:23.3037693s - ReadConfig: 'ResolvePeerBackoffMaxTimes'=0x00000007 (2)
153514 12:12:23.3038323s - ReadConfig: 'EventLogFlags'=0x00000001 (2)
153514 12:12:23.3038952s - ReadConfig: 'LargeSampleSkew'=0x00000003 (2)
153514 12:12:23.3039722s - ReadConfig: 'SignatureAuthAllowed'=0x00000001 (2)
153514 12:12:23.3040458s - ReadConfig: 'Type'=NTP (2)
153514 12:12:23.3041173s - ReadConfig: 'NtpServer'=172.28.134.229,0x8 (2)
153514 12:12:23.3042074s - ReadConfig: 'ManualPeerList'(parsed)='172.28.134.229,0x8'
153514 12:12:23.3042832s - ReadConfig: 'MinPollInterval'=0x0000000A (2)
153514 12:12:23.3043476s - ReadConfig: 'MaxPollInterval'=0x0000000F (2)
153514 12:12:23.3043993s - Poll interval settings: MinPollInterval:10 MaxPollInterval:15
153514 12:12:23.3044728s - NTP client telemetry enabled: 0
153514 12:12:23.3049786s -   ManualPeerListUpdate: add:0 del:0 noch:1
153514 12:12:23.3055288s - StartListeningThread completed!
153514 12:12:23.3056254s - PeerPollingThread: waiting 497.492s
153514 12:12:23.3056982s - StartPeerPollingThread completed!
153514 12:12:23.3062014s - Starting 'VMICTimeProvider', dll:'C:\Windows\System32\vmictimeprovider.dll'
153514 12:12:23.3199766s - LoadLibrary
153514 12:12:23.3201254s - Logging Info: Time provider 'VMICTimeProvider' indicated that the current operating environment is unsupported and has stopped. This is expected for VMIC provider in non-Hyperv environments. This may be the expected behavior for the current provider in the current operating environment as well. error:-2147024846
153514 12:12:23.3242933s - Discarding provider 'VMICTimeProvider'.
153514 12:12:23.3243877s - RemoveProviderFromList: VMICTimeProvider
153514 12:12:23.3244382s - /--TimeProvider: Provider list after the provider is actually removed
153514 12:12:23.3244921s - | Name:NtpClient, Started:1, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3245383s - >--
153514 12:12:23.3245879s - | Total:1, Input: 1, Marked: 0
153514 12:12:23.3246336s - \--
153514 12:12:23.3246865s -   Provider list: 0 stopped, 0 started, 1 not changed.
153514 12:12:23.3247354s - /--TimeProvider: Parameter change after list is updated
153514 12:12:23.3247893s - | Name:NtpClient, Started:1, Input:1, Marked:0, RefCount:0, DllName:C:\Windows\SYSTEM32\w32time.DLL
153514 12:12:23.3248543s - >--
153514 12:12:23.3249166s - | Total:1, Input: 1, Marked: 0
153514 12:12:23.3249733s - \--
153514 12:12:23.3250806s - RPC Call - Query Configuration
153514 12:12:23.3252165s - RPC Call - Query Provider Configuration
153514 12:12:23.3252760s - TimeProvCommand([NtpClient], TPC_Query) called.
153514 12:12:23.3253381s - RPC Call - Query Provider Configuration
153514 12:12:23.3255358s - UpdateTimerQueue1: TN:112283120000::: LRT:104334530000  LUT:112122810000 LAFLTNS:160021737 TSLGT:160021737 LTNS:864000000000
153514 12:12:23.3255909s - W32TmServiceMain: waiting 1023.998s