Wrong time source in Windows Server 2016 (PDC)

Alextheonlyone 196 Reputation points
2021-03-10T12:47:29.84+00:00

Hi All!

We have 2 DC's, the first is a PDC and it is configured to receive time from an external time server. The second DC receives time from the first DC and other workstations receive time from one of DC's. Everything worked fine until last week.

The problem is that, however the confoguration of the first DC is OK, its ignored the configured time source and get time from the LOCAL CMOS. Let's see:

C:\Users\Administrator.DOMAIN>w32tm /query /configuration
[Configuration]

EventLogFlags: 2 (Local)
AnnounceFlags: 5 (Local)
TimeJumpAuditOffset: 28800 (Local)
MinPollInterval: 6 (Local)
MaxPollInterval: 10 (Local)
MaxNegPhaseCorrection: 1800 (Local)
MaxPosPhaseCorrection: 1800 (Local)
MaxAllowedPhaseOffset: 300 (Local)

FrequencyCorrectRate: 4 (Local)
PollAdjustFactor: 5 (Local)
LargePhaseOffset: 50000000 (Local)
SpikeWatchPeriod: 900 (Local)
LocalClockDispersion: 10 (Local)
HoldPeriod: 5 (Local)
PhaseCorrectRate: 7 (Local)
UpdateInterval: 100 (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: 100 (Local)
Type: NTP (Local)
NtpServer: 150.254.190.51,0x1 (Local)

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

C:\Users\Administrator.DOMAIN>w32tm /query /peers

Peers: 1

Peer: 150.254.190.51,0x1
State: Pending
Time Remaining: 55458.8999948s
Mode: 0 (reserved)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 0 (unspecified)

C:\Users\Administrator.DOMAIN>w32tm /query /source
Free-running System Clock

C:\Users\Administrator.DOMAIN>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 1 (primary reference - syncd by radio clock)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 10.0000000s
ReferenceId: 0x4C4F434C (source name: "LOCL")
Last Successful Sync Time: 2021. 03. 09. 18:57:04
Source: Free-running System Clock
Poll Interval: 6 (64s)

C:\Users\Administrator.DOMAIN>w32tm /monitor
DC1.domain * PDC *[[fe80::546d:44b6:9d00:c9fc%4]:123]:
ICMP: 0ms delay
NTP: +0.0000000s offset from DC1.domain
RefID: 'LOCL' [0x4C434F4C]
Stratum: 1
DC2.domain[192.168.1.23:123]:
ICMP: 0ms delay
NTP: -0.0006187s offset from DC1.domain
RefID: DC1.domain [192.168.1.99]
Stratum: 2


Now I configure again:

C:\Users\Administrator.DOMAIN>w32tm /config /manualpeerlist:"time.windows.com,0x1" /syncfromflags:MANUAL /reliable:yes /update
The command completed successfully.

C:\Users\Administrator.DOMAIN>net stop w32time && net start w32time
The Windows Time service is stopping.
The Windows Time service was stopped successfully.

The Windows Time service is starting.
The Windows Time service was started successfully.

C:\Users\Administrator.DOMAIN>w32tm /config /update
The command completed successfully.

C:\Users\Administrator.DOMAIN>w32tm /resync /nowait
Sending resync command to local computer
The command completed successfully.

C:\Users\Administrator.DOMAIN>w32tm /query /peers

Peers: 1

Peer: time.windows.com,0x1
State: Active

Time Remaining: 79.0292684s
Mode: 1 (Symmetric Active)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 6 (64s)

C:\Users\Administrator.DOMAIN>w32tm /query /status
Leap Indicator: 0(no warning)
Stratum: 1 (primary reference - syncd by radio clock)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 10.0000000s
ReferenceId: 0x4C4F434C (source name: "LOCL")
Last Successful Sync Time: 2021. 03. 10. 13:31:18
Source: Local CMOS Clock
Poll Interval: 6 (64s)

C:\Users\Administrator.DOMAIN>w32tm /query /source
Local CMOS Clock

(Local CMOS Clock - it is a difference! Earlier, when the state was pending, the source was: Free-running System Clock) Why?


Some week ago, the output of w32tm /monitor command was:

C:\Users\Administrator.DOMAIN>w32tm /monitor
DC1.domain * PDC *[[fe80::8049:7f2a:d367:cf41%8]:123]:
ICMP: 0ms delay
NTP: +0.0000000s offset from DC1.domain
RefID: vega.cbk.poznan.pl [150.254.190.51]
Stratum: 2
DC2.domain[192.168.1.23:123]:
ICMP: 0ms delay
NTP: +0.0004628s offset from DC1.domain
RefID: DC1.domain [192.168.1.99]
Stratum: 3

I registered the time services again and restart the server las week, but nothing changed.

I don't know whats wrong :( Please help me.
Thanks in advance!

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,436 questions
0 comments No comments
{count} votes

Accepted answer
  1. Alextheonlyone 196 Reputation points
    2021-03-12T13:34:28.063+00:00

    I changed the time server and it works!

    D:\>w32tm /query /source
    time.google.com,0x1

    So, the windows.time.com and the vega.cbk.poznan.pl also no longer work for us. Magnificent!
    I turned off GPO policies and switched back to the configured version of registry.

    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Alextheonlyone 196 Reputation points
    2021-03-11T13:23:59.367+00:00

    Dear Daisy Zhou!

    1) I set in the local registry.
    2) It is a physical machine.
    4) Nothing changed. Probably it just got an update (KB4601318).

    The local registry entries of PDC is good.

    I set your recommended policies on the PDC and I use an our original time source, because surprisingly I can't ping the time.windows.com. Here is our actual configuration:

    C:\Users\Administrator.DOMAIN>w32tm /query /configuration
    [Configuration]

    EventLogFlags: 2 (Local)
    AnnounceFlags: 5 (Local)
    TimeJumpAuditOffset: 28800 (Local)
    MinPollInterval: 6 (Local)
    MaxPollInterval: 10 (Local)
    MaxNegPhaseCorrection: 172800 (Local)
    MaxPosPhaseCorrection: 172800 (Local)
    MaxAllowedPhaseOffset: 300 (Local)

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

    [TimeProviders]

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

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

    Unfortunately the time soure hasn't changed :( :

    C:\Users\Administrator.DOMAIN>w32tm /query /source
    Local CMOS Clock

    What's going on? :(


  2. Alextheonlyone 196 Reputation points
    2021-03-11T14:46:12.683+00:00

    Hi DSPatrik,

    I did it, but it hasn't changed :(

    Here is the actual configuration:

    C:\Users\Administrator.DOMAIN>w32tm /query /configuration
    [Configuration]

    EventLogFlags: 2 (Local)
    AnnounceFlags: 5 (Local)
    TimeJumpAuditOffset: 28800 (Local)
    MinPollInterval: 6 (Local)
    MaxPollInterval: 10 (Local)
    MaxNegPhaseCorrection: 172800 (Local)
    MaxPosPhaseCorrection: 172800 (Local)
    MaxAllowedPhaseOffset: 300 (Local)

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

    [TimeProviders]

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

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

    C:\Users\Administrator.DOMAIN>w32tm /query /source
    Local CMOS Clock

    0 comments No comments

  3. Alextheonlyone 196 Reputation points
    2021-03-10T17:05:37.407+00:00

    C:\Users\Administrator.DOMAIN>w32tm /unregister
    W32Time successfully unregistered.

    C:\Users\Administrator.DOMAIN>net stop w32time
    The Windows Time service is stopping.The service name is invalid.

    More help is available by typing NET HELPMSG 2185.

    C:\Users\Administrator.DOMAIN>w32tm /register
    W32Time successfully registered.

    C:\Users\Administrator.DOMAIN>net start w32time
    The Windows Time service is starting.
    The Windows Time service was started successfully.

    C:\Users\Administrator.DOMAIN>w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update
    The command completed successfully.

    C:\Users\Administrator.DOMAIN>net stop w32time
    The Windows Time service is stopping.
    The Windows Time service was stopped successfully.

    C:\Users\Administrator.DOMAIN>net start w32time
    The Windows Time service is starting.
    The Windows Time service was started successfully.

    C:\Users\Administrator.DOMAIN>w32tm /query /source
    Local CMOS Clock

    C:\Users\Administrator.DOMAIN>w32tm /query /configuration
    [Configuration]

    EventLogFlags: 2 (Local)
    AnnounceFlags: 5 (Local)
    TimeJumpAuditOffset: 28800 (Local)
    MinPollInterval: 6 (Local)
    MaxPollInterval: 10 (Local)
    MaxNegPhaseCorrection: 172800 (Local)
    MaxPosPhaseCorrection: 172800 (Local)
    MaxAllowedPhaseOffset: 300 (Local)

    FrequencyCorrectRate: 4 (Local)
    PollAdjustFactor: 5 (Local)
    LargePhaseOffset: 50000000 (Local)
    SpikeWatchPeriod: 900 (Local)
    LocalClockDispersion: 10 (Local)
    HoldPeriod: 5 (Local)
    PhaseCorrectRate: 7 (Local)
    UpdateInterval: 100 (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: 3600 (Local)
    Type: NTP (Local)
    NtpServer: time.windows.com (Local)

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

    C:\Users\Administrator.CARDINAL>w32tm /peers
    The command /peers is unknown.

    C:\Users\Administrator.CARDINAL>w32tm /query /peers

    Peers: 1

    Peer: time.windows.com
    State: Active

    Time Remaining: 8.3526662s
    Mode: 1 (Symmetric Active)
    Stratum: 0 (unspecified)
    PeerPoll Interval: 0 (unspecified)
    HostPoll Interval: 6 (64s)

    0 comments No comments

  4. Daisy Zhou 21,361 Reputation points Microsoft Vendor
    2021-03-11T09:17:50.133+00:00

    Hello @Alextheonlyone ,

    Thank you for posting here.

    1.How do you configure time on PDC? Via registry or GPO?
    2.Is your PDC physical machine or virtual machine?
    3.If your PDC is virtual machine, did you turn off the time synchronization with VM host?
    4.Did you make any change before the issue occurs?

    We can try to check the time configuration on your PDC.

    Method 1: Use registry configuration method

    We can configure time synchronization via registry as below:

    ===PDC===

    If the PDC is a virtual machine, set the first one entry. Don’t set this one entry if it’s not a virtual machine.

    HLM\SYSTEM\CurrentControlSet\services\w32time\TimeProviders\VMICTimeProvider
    Name: Enabled
    Type: REG_DWORD
    Data:0

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
    Key Name: AnnounceFlags
    Type: REG_DWORD (DWORD Value )
    Data: 0x5

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    Key Name: Type
    Type: REG_SZ(String Value)
    Data: NTP

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
    Key Name: NtpServer
    Type: REG_SZ(String Value)
    Data: Peers (For example: time.windows.com,0x9)

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
    Key Name: Enabled
    Type: REG_DWORD
    Data: 1

    ===other DCs & Clients & member servers===

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    Key Name: Type
    Type: REG_SZ(String Value)
    Data: NT5DS

    Path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
    Key Name: AnnounceFlags
    Type: REG_DWORD (DWORD Value )
    Data: 0xa

    Method 2: Use group policy configuration method

    We can also configure time synchronization via GPO as below:

    ===Apply to the primary domain controller (PDC)===
    Computer Configuration\Policies\Administration Templates\System\Windows Time Service\Time Providers\Enable Windows NTP Client

    Computer Configuration\Policies\Administration Templates\System\Windows Time Service\Time Providers\Configure Windows NTP Client==>Type is "NTP"

    ===Apply to other domain controllers & clients===
    Computer Configuration\Policies\Administration Templates\System\Windows Time Service\Time Providers\Configure Windows NTP Client==> Type is "NT5DS"

    Time Synchronization in Active Directory Forests
    https://social.technet.microsoft.com/wiki/contents/articles/18573.time-synchronization-in-active-directory-forests.aspx

    Tip:

    1. Make sure that the UDP port 123 is open.
    2. Be able to ping the NTP time server.

    Hope the information above is helpful.

    Should you have any question or concern, please feel free to let us know.

    Best Regards,
    Daisy Zhou

    0 comments No comments