Windows & NIST time servers giving erroneous times to Windows 12 Server? - time

I am running a LTI tool for my university LMS on a Windows 12 Server and it was failing today. It turned out that the server time was about 20 minutes ahead of the correct time and my tool was timing out.
It was synched with the windows.com time service, which was 20 minutes ahead, and so were the NIST time services available. I ended up unsynching and adjusting. I don't see anyone else with the same issue anywhere, and the NIST internet clocks all look correct.
What could possibly be the issue here?

Aha. My Windows Server is a VPS, so it does not really connect to any of the time services, but the time is probably set at the backend. So I contacted my VPS provider. Fortunately, it was not the timer service apocalypse.

Related

System Time becomes incorrect on reboot of VMs

Ever since virtualizing several physical servers into GCP, I have had an issue where anytime the servers(s) are rebooted the time is changed to be several hours ahead (I think it's 4 hours, but may be 6 hours). My local office is located in CST time zone and that is what we want the server to display. In GCP the virtual servers are in the us-central1a zone. On the virtual server, run the tzutil /g command it shows that the server is set to "central standard time". It also shows Central timezone if I click the clock on the toolbar then choosing "change date and time settings"
After the server has been rebooted (and reports wrong time) I can correct the time by clicking the "update now" options (found on toolbar clock, "change date and time settings", internet time tab, change settings" "update now" (this points to time server time.nist.gov).
This issue only began occurring after migrating into GCP so I believe it to be a Compute Engine issue and not an OS issue.
any thoughts on why this might be happening? I have this on occurring on all 4 windows servers that were migrated into Google Cloud. three are win2008r2, and one is Win2012r2
I appreciate any help that can be given to get this resolved, as I can't even reboot without connecting to the server afterwards and checking/fixing the time, I do have set a startup script to delay and then sync time after rebooting, but it has not worked 100% of the time, so this is more of a band-aid than a fix.
I do have set a startup script to delay and then sync time after rebooting, but it has not worked 100% of the time, so this is more of a band-aid
Getting this script working is probably the solution, here. For what it's worth, you'd need to do the same thing on both Azure and AWS as well, since they also set Windows timezones to UTC by default using the same mechanism.
See AWS docs on the Specialize Phase
See this Stackoverflow question for a similar question about Windows on Azure
Normally all servers run on UTC time, its clients (applications, browsers, etc) set their timezones according to where they are, and its up to them to translate UTC time to whichever locale they are in. (Put another way, you wouldn't want a server with a million client connections to have to keep track of each client's timezone in order to work properly). In your case, the bottom line is that requiring a custom timezone on the server will also require a custom server configuration, and the behavior you're seeing is by design. That's why your best bet is to understand why the startup script isn't working like you expect it to.
For reference, these docs may be helpful:
Google Compute Engine: Providing a startup script for Windows instances
Google Compute Engine: Creating a Windows Image
If you looked at the VM instance logs in the GCP Console you'd see that VM BIOS reports time in UTC
2019/10/3 14:9:44 Begin firmware boot time
After a while BIOS hands over to the bootloader
2019/10/3 14:9:45 End firmware boot time
Booting from Hard Disk 0...
The OS boots up. Behind the scene the OS time service recognizes the system timezone, then sets up and synchronizes time with the time source. From that time forward running programs and services report events based on the local system time:
...
2019/10/03 09:10:05 GCEWindowsAgent: GCE Agent Started (version 4.6.0#1)
In the Windows Event Log you should see entries made by the Time-Service:
Log Name: System
Source: Time-Service
Level: Information
The time provider NtpClient is currently receiving valid time data from metadata.google.internal,0x1 (ntp.m|0x1|0.0.0.0:123->169.254.169.254:123).
The time service is now synchronizing the system time with the time source metadata.google.internal,0x1 (ntp.m|0x1|0.0.0.0:123->169.254.169.254:123).
In the command prompt you can ensure that the time configuration and state are correct:
C:\Users\user>systeminfo | find /i "Time"
System Boot Time: 10/3/2019, 9:09:49 AM
Time Zone: (UTC-06:00) Central Time (US & Canada)
Hence you don't need synchronizing time neither manually or with with a startup script. The time service will do it for you: to synchronize the system time right after the boot and to keep it in sync afterwards.
All you need is to set correct Time zone and the Internet time server for Windows, and then make sure the time server is reachable via the network.

Windows Azure Websites Latency

for a client a run a website on Windows Azure (Websites). I run in reserved mode and have two medium insances. I run these PHP sites on Windows and I have a separate MySQL server (running on Windows). Memory enough, no high utilization, but once every minute or two minutes I have an explained higher latency (3 seconds, instead of 300 milliseconds).
Does one experience the same behaviour, or recognize this?
All happens within one Windows Azure datacenter.
When I loadtest it with a tool, the tool thinks my website runs in Redmond, how come?
I believe what you are seeing is an artifact of hot and cold websites. Windows Azure websites use a concept of hot websites for an active connection and after few seconds when there are no active connections to Azure websites, the websites becomes cold. And when a website is in cold mode it may take little longer to start in its first time however after subsequent connection the load time is very fast.
Similar discussion are found here:
Very slow opening MySQL connection using MySQL Connector for .net

How to send GPS data to server every 5 minutes?

I am planning to write WP7 app, which needs to send to server phones GPS position every 5 minutes. Data must be sent to server even if app is not running. One way to do that is to use Background agents (I am using 7.5 Mango), but in that case app will send data only every 30 minutes, which is not acceptable in my case.
Is there any other solution?
Thanks in advice.
No, this is not a supported usecase for WP7 apps on Mango. Also, it's important to mention that the location you'll get for GeoCoordinateWatcher on a background agent is a cached geolocation from approximately the last 15 minutes and not the real-time geolocation.
What exactly are you trying to build if you don't mind me asking? This sounds oddly close to spyware. Even if it's innocuous and meant for a good purpose, I'd be careful walking in any direction that constantly shares GeoLoc with a remote server.
Your only choices are sending the data every 5 minutes while application is running (even when the phone is locked) and/or send the data once every 30 minutes by registering a PeriodicTask.
Having said that, I agree with Justin in that what you are describing sounds nefarious.

In Amazon Web Service ec2 why it require 15 min to generate password?

while using AWS ec2
when i try to launch windows server 2003 instance it give me massage that please wait for 15 min.Actually password generated after 25 min
Why this is happen ?
please help.
Regards,
Tushar
There's quite a lot going on behind the scenes when you launch an EC2 instance, and host load, network load and Windows itself can all increase the amount of time it takes between clicking 'Launch' and having the password generated and ready for extraction.
15 minutes is the 'usual' amount of time it can take, but I've had VMs take 20-30 minutes to go from cold to ready-to-use. It's the nature of the environment that your VMs run in - sometimes it just takes a bit longer.

How do you compute the client/server timegap?

I'm developing a client/server software, and I'm searching the best way to keep my client clocks in sync with the server clock.
Of course, I can't use NTP because I don't want to touch the system clock. I'm just trying to compute a timegap so that I can add it to every single datetime received from the server to convert it into a 'local time'
What I do for know is that :
I handle the TimeZone problems using GMT time
Server send its current time to Client upon connection, and Client subtract the server time from its time to compute the timegap.
This works great when network lag is constant (read "my LAN"...)
Unfortunately, I want my software to work on the Internet, and even on mobile clients, for which I've witnessed lag variations up to 1 minute.
For the software I'm working on, such a lag is not acceptable.
What would be a good strategy to compute the client/server timegap?
Last thing : I can send messages in both way (client to server AND server to client)
It's probably irrelevant, but the technology behind this is a .net WCF client using an httpbinding with some polling
Why can't you use NTP? Of course the default thing for ntp is to set the system time, but that is not obligatory:
$ ntpdate -q ntp.ubuntu.com
server 91.189.94.4, stratum 2, offset -0.102597, delay 0.05426
2 Mar 11:44:36 ntpdate[12239]: adjust time server 91.189.94.4 offset -0.102597 sec
You could ping the server on regular intervals to calculate the lag. I don't think you can get really close over the internet.

Resources