The local machine's clock may be out of sync with the server time by more than five minutes
Asked Answered
E

4

6

While configuring VSTS agent locally through command prompt with admin privileges, i've encountered the error below

The local machine's clock may be out of sync with the server time by more than five minutes. Please sync your clock with your domain or internet time and try again

I've tried different google answers but nothing worked out. Please help me

Eleanoreleanora answered 24/10, 2017 at 7:17 Comment(8)
What's the OS do you use? And what if you change the VSTS time zone in https://account.visualstudio.com/_admin/_home/settings page same with the time zone with the agent machine?Slumberous
I'm using Windows 10 Enterprise. I've checked the timezone w.r.to machine,both were different previously. I've set them now and tried configuring the agent again. This resolved my iisueEleanoreleanora
My issue Resolved. Thank you @Marina-MSFTEleanoreleanora
Glad to hear your problem solved. I added it as an answer, you can mark it. And it will benefit others who have similar questions :)Slumberous
@Eleanoreleanora I am also facing the same issue, I have updated timezone in my VSTS organization, but still, it not worked for me. How much time does it take after modifications? Have you restarted Machine/Service?Kutzer
@Eleanoreleanora As Nilay said. I have also updated timezone in my devops organization. But still this does not work for me. What to do? Do I need to restart/update something elseHobble
@Nilay Did you find a solution for this? I've restarted the machine and the service, but still the same issueHobble
@Hobble No luck.Kutzer
S
4

It's mainly caused the time for agent machine is asynchronous with the time shows in VSTS.

You can check if the time zone for your agent machine is same with the time zone in VSTS settings page (https://account.visualstudio.com/_admin/_home/settings).

Slumberous answered 24/10, 2017 at 8:45 Comment(2)
Currently, for VSTS we need to open https://<organization-name>.visualstudio.com/_admin/_settingsKutzer
Currently, for devops we need to open https://dev.azure.com/<organization-name>/_settings/Hobble
C
2

The error message is helpful in that it tells you most of what you need to know. Specifically, that you need to ensure the timezones of the machines are in sync.

For Azure DevOps Services, the location of the timezone setting is now found at:

'Organization Settings' > 'Overview' > 'Time Zone'

In my case, I also needed to ensure the time settings on the machine hosting the agent were correct.

Right-click the time(bottom-right by default) > 'Adjust date/time'
Colum answered 15/6, 2020 at 19:52 Comment(0)
E
1

I too had same issue recently. Thanks for the answer. Just to summarize

Sync the TimeZone in VSTS account settings page (https://account.visualstudio.com/_admin/_home/settings) to Local system DateTime.

In Case Timezone differs in Local, try this & change TimeZone and time

http://www.dummies.com/computers/operating-systems/windows-10/how-to-change-the-date-or-time-on-the-windows-10-desktop/

Ekg answered 24/10, 2017 at 8:49 Comment(0)
P
0

You can sync the time in a CMD window with:

wsl -d docker-desktop -e /sbin/hwclock -s

Restart the agent after syncing.

Pitchy answered 20/6, 2022 at 6:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.