operation_parentId does not hold the value of the parent's operation_id. Instead it holds the value of the parent's request id. Confusing, eh?
operation_id has to be set in every logical service.
the request id has to be globally unique for every call, so you cannot set it to be a business key, such as an order reference.
Friday 16 August 2019
Tuesday 13 August 2019
Docker for Windows Desktop clock skew: Cosmos DB "The authorization token is not valid at the current time. Please create another token and retry"
I had a containerised application that connects to my Cosmos DB emulator running on my development environment.
Sometimes when I went back to the app after a couple of days it would fail. The Cosmos DB client would error with:
"The authorization token is not valid at the current time. Please create another token and retry"
Looking at the times in the message they were earlier than the current time so that token was out of date.
Attaching to the container with:
docker exec -it <container ID> /bin/bash
I could see that the container time was indeed wrong.
Sometimes when I went back to the app after a couple of days it would fail. The Cosmos DB client would error with:
"The authorization token is not valid at the current time. Please create another token and retry"
Looking at the times in the message they were earlier than the current time so that token was out of date.
Attaching to the container with:
docker exec -it <container ID> /bin/bash
I could see that the container time was indeed wrong.
Solution 1
The solution was to restart Docker for Windows desktop.Solution 2
The other solution is to go into Hyper-V Manager, select the Linux VM, select the settings, Integration Services and then disable and then re-enable Time Synchronisation.
Subscribe to:
Posts (Atom)