Few days ago, I had a strange issue where all of a sudden, the statistics on some of my web servers stopped working.

First thought was, nah, its some PEBKAC issue. Statistics was working great, and nothing in the configuration wasnt changed for months. The customer must have some outdated link, wrong password or something else.

 

The error my customers were getting is :

 

Microsoft.Web.Services3.ResponseProcessingException: WSE910: An error happened
during the processing of a response message, and you can find the error in the
inner exception. You can also find the response message in the Response
property. ---> Microsoft.Web.Services3.Security.SecurityFault: An error was
discovered processing the header ---> System.Exception: WSE065: Creation time of
the timestamp is in the future. This typically indicates lack of synchronization
between sender and receiver clocks. Make sure the clocks are synchronized or use
the timeToleranceInSeconds element in the microsoft.web.services3 configuration
section to adjust tolerance for lack of clock synchronization. --- End of inner

 

The part of the error that gave me a hint is:
Creation time of the timestamp is in the future. This typically indicates lack of synchronization between sender and receiver clocks.

 

Soooo…I login to my WebSitePanel server and check the time…it was 9:24 AM. I login to the web server that is giving the above mentioned error , also 9.24 AM.

First reaction…WTH!!?!?!?!?

I thought to myself: “Nah..I’ll try it anyway. Left click on the Clock, change time and date settings, Internet time, Change settings, and then click the “Update now”. All of a sudden, my statistics started to work. GREAT, that part is solved.

Now, lets try to find the reason for this behaviour, ofcourse, there are hundreds of articles on the web, and every single one of them is pretty much useless in my case :) .

My search was pointless, and quoting James May from Top Gear, I thought to myself:

“Oh cock!” :)

Well, atleast let me try to patch the thing up. My idea was to use our own ntp servers on all our windows machines ( instead of time.windows.com, or some other ntp server listed ). In order to achieve this, you must replicate these steps:

  1. Stop the W32Time service with : C:\>net stop w32time
  2. Configure the external NTP server by  typing : C:\> w32tm /config /syncfromflags:manual /manualpeerlist:”1stNTP.domain.com, 2ndNTPserver.domain.com”
  3. Then make your  PDC a reliable NTP server with  C:\>w32tm /config /reliable:yes
  4. Start the w32time service with : C:\>net start w32time
  5. You can check the NTP servers configuration by typing: C:\>w32tm /query /configuration

Next thing I decided to do was to autmate the time sync, since I didnt want to rely on Windows to do it.

Command for that is pretty simple : c:\w32tm /resync

In order to achieve that, I created a batch file with the above mentioned command, set it to run every day at 12:00 AM, and thats it. Never heard of time sync issues EVER again!

Bye, Alesandro