Time Synchronization Issues with EC2? We can help you.
With Coordinated Universal Time for the instances, we can avoid human error.
Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.
Today, let us see how our Support Techs fix the Synchronization issue.
Time Synchronization Issues with EC2
UTC on the instances facilitates synchronization across the AWS CloudWatch logs, metrics, local logs, and other services.
If necessary, we can use a different time zone to suit the requirements.
How to resolve this?
Moving ahead, let us see how our Support Techs go about this query.
Unable to change the time using Systems Settings or the Control Panel
We can access the Amazon Time Sync Service from all EC2 instances.
First and foremost, we need to disable the Prohibit access to Control Panel and PC settings policy.
- To do so, we open the Local Group Policy Editor.
- Then we select User Configuration > Administrative Templates > Control Panel.
- We highlight Prohibit access to Control Panel and PC Settings and then select Edit policy setting.
- Finally, we select Disabled.
Change it via Command Prompt:
- We run a Command Prompt window as Administrator.
- Then we enter time or date in the Command Prompt window.
- Eventually, we select OK.
- Enter the new time or date at the prompt:
Time in HH:MM:SS AM/PM format.
Date in mm-dd-yyyy format.
The changes will take effect immediately.
Alternatively, we can use external network time protocol (NTP) sources.
The time change doesn’t persist after the system reboots
In the case of Windows Server 2008 or later, we add a RealTimeIsUniversal registry key to make the new time persist after reboot.
If the instance is domain joined to an AWS Managed Microsoft AD directory, we change the time settings to use the domain controller as the time source to avoid a time skew.
Skewing the time breaks authentication. To prevent this, we need to enable the RealTimeIsUniversal registry key before rebooting the instance.
The Amazon Time Sync Service is behind other atomic clocks by X minutes
To resync the Amazon Time Sync Service to the instance, our Support Techs suggest:
1. Initially, to reset the NTP server to point to the Amazon Time Sync Service server:
w32tm /config /manualpeerlist:”169.254.169.123,0x9” /syncfromflags:manual /update
2. Then run the following commands:
net stop w32time w32tm /unregister
3. From the Start menu, we select Run and enter services.msc. Later, we verify that Windows Time is deleted.
4. After that, we run:
W32tm /register Net start w32time w32tm /query /configuration /verbose w32tm /resync /rediscover and w32tm /resync /force w32tm /query /status /verbose w32tm /stripchart /computer:169.254.169.123 /period:5 w32tm /query /source
Suppose we see the local CMOS clock. Then we need to wait a few minutes and run the w32tm /query /source command again to verify the source.
[Need help with the process? We are here for you]
In short, we saw how our Support Techs fix the time issue for our customers.