Monday, June 1, 2009

Syncing the Time on Windows Server 2008

You never know what I might write about. Today is the solution to a problem I just discovered on my web server. The server's time was about 10 minutes slow, and I am a stickler for all my systems to have the correct time. Even back in the days of Windows 3.1 I had a program that would sync my computer with the time server in Colorado.

Now we come to the new OS, Windows Server 2008, which apparently did not come preconfigured knowing what time server to sync to. So here is how to get Windows Server 2008 to automatically sync the time on a regular schedule.

  1. Make sure your computer is set to the correct time zone. Right-click the time in the lower right corner and then click on "Adjust Date/Time", correct time zone if needed.
  2. Download Atomic Clock Sync 3.0 from http://www.worldtimeserver.com/atomic-clock. There is no installer, just the exe.
  3. Run Atomic.exe, click the "Synchronization Interval" tab. Set the value for how often you want the computer to resync and click Apply, then click "Sync Now".

Here is where the problem may start. If you received "The command completed successfully", you are done. Goodbye.

If you received "The computer did not resync because no time data was available", go through the steps on the "Repair Service" tab. If it works now, you are done. Goodbye.

If you are still here, maybe what worked for me will work for you. Open a command prompt and type "net time /querysntp", then press Enter. If you get the response "This computer is not currently configured to use a specific SNTP server", this is what happened to me. Proceed with the steps outlined below and hopefully your problem will be resolved.

  1. Still in the command window, type "w32tm /stripchart /computer:time.windows.com /samples:5 /dataonly" and press Enter.
  2. Assuming you get back valid numbers, great, proceed to the next step. If not, check your ports or try a different server (see references below).
  3. Still in the command window, type "w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update" and press Enter.
  4. Go back to the "Synchronization Interval" tab in Atomic Clock Sync and press "Sync Now".

If all went well, you are done. If not, try some of the links below for more information.

References:
http://technet.microsoft.com/en-us/library/cc773263.aspx
http://technet.microsoft.com/en-us/library/cc786897.aspx
http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/96278628-03a1-4b3d-90d9-2208a65a1210
http://support.ntp.org/bin/view/Servers/WebHome

This may not work in all situations, from my research I found that some situations require a change in group policy or a registry edit. Here are two articles related to older OSes that I did not have to use, but may be useful if the above did not resolve your issue.
http://www.chicagotech.net/server/timeissues2.htm
http://windowsitpro.com/article/articleid/94615/when-you-run-the-w32tm-resync-command-on-a-windows-server-2003-computer-you-receive-the-computer-did-not-resync-because-no-time-data-was-available.html

Labels: , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home