I am using document db with my console application. I am able to access document db with my project running without any issue. But when I am running my console application with docker locally on windows as windows container its not able to access document db.
I am getting following error :
The authorization token is not valid at the current time. Please create
another token and retry (token start time: Mon, 12 Mar 2018 20:54:57 GMT,
token expiry time: Mon, 12 Mar 2018 21:09:57 GMT,
current server time: Mon, 12 Mar 2018 08:24:47 GMT).
ActivityId: a3e015e6-a4bb-47dc-bf24-c7ceacad317c,
Microsoft.Azure.Documents.Common/1.21.0.0, Windows/10.0.16299 documentdb-
netcore-sdk/1.8.1
It seems issue with time sync problem.
Please let me know if you need more details.
I faced the similar issue, and here is the reply from Microsoft
Cosmosdb authorization token is generated for a time period between Now – 1 minute to Now + 15 minutes. The -1 was to account for clock drift between client machines and servers (which are synchronized).
The fact that you’re seeing this error clearly shows that we should have allowed for a longer time window to account for real world clock drifts, and we will increase this to -5 minutes in an upcoming service release.
Meanwhile, a workaround that might help you is to adjust your machines time back by 2 minutes.
Adjusting my machine time back by 2 minutes fixed the problem and allowed me to access my Costmosdb account. Hopefully the permanent fix will be deployed soon.
Related Issue
Related
I have tried in local that mean application source code it working.but when i was deploy in live server that time is not working.that session will expired in 20 mins. below i mention the code
I am trying to disable the notifications on client's side so they don't get notifications at night (10PM to 7AM).
Server's is not aware of the timezone and the app is used worldwide so my only option is to disable notifications on the client.
I haven't seen anything that could help me to achieve that around.
Do you have any idea how to do that?
The server has to do it. Make/ask for an endpoint that accepts two times, both in GMT. The client should know how to convert it's local time to GMT and the server should be able to respect the GMT time range.
Using TFS 2017 Update 2, we notice that we sometimes get some email notification double, with a lot of time (30 minutes) between them.
We are not using distributions lists, users are added to TFS Teams directly.
When checking the View link in the bottom, its shows the same ID for all duplicate emails, so its the same alert triggering it.
A concrete example
Build completed at 11:18 AM. We received an identical notification at 11:37, 11:53 and 12:09.
First issue is already that there is 20 minutes between the completion of the build and the sent of the first message.
What part of TFS should i troubleshoot here, we have noticed before that email alerts are received later then expected.
So we have 2 issues, which might be related
1. Emails arrive up to 30 minutes later than expected
2. Identical Emails sometimes are received 2/3 times.
Update, issue came back.
Technical Details:
Build Ran for 15.3 minutes (Default), completed at Fri 12/01/2017 01:48 PM
1st email header:
Received: from TFSAPPSERVER (ip) by smtphost.domain.com
(ip address) with Microsoft SMTP Server id 14.3.319.2; Fri, 1 Dec 2017
07:50:34 -0600 ( 01:50 PM tranlated to same time above)
2nd email header:
Received: from TFSAPPSERVER (ip) by smtphost.domain.com
(ip address) with Microsoft SMTP Server id 14.3.319.2; Fri, 1 Dec 2017
08:26:37 -0600 ( 02:26 PM tranlated to same time above)
In this thread there is a solution from Microsoft:
The root of our issue was that the SMTP server was not responding to TFS to indicate that the mail was sent within the timeout period. Thus the fix in our case was simply to increase the timeout that TFS waits before re-sending emails.
To do this, we ran the following in the TFS Configuration database to change the timeout from 10 seconds (the default) to 90 seconds:
exec prc_SetRegistryValue 1, '#\Service\Integration\Settings\SendTimeout\', 90000
I registered a local notification which will occur every day .But in my application we have a setting called out of office where the user can select his out of office period for a period .(example: From Nov 4 to Nov 10).In between these days i should not get the reminder.Is there any way to do this?
I developed a windows service that must logon to a server. It works fine. I set it to start automatically when the windows starts.
The problem is when there is no network avaliable, generating a "logon failure". This service MUST run 24hours a day, 365 days a year.
How can I avoid this service from crashing when it trys to logon, but can't reach the server?
Thanks.
Do a try...catch block, and set up a timer for say 30 seconds to retry.