-
Notifications
You must be signed in to change notification settings - Fork 258
[V2] Windows container sometimes doesn't sync time with host, cause edgeHub failed to connect to IoT Hub. #565
Comments
Here is the log which shows time sync issue:
|
Thank you for reporting this. I'm adding this as a bug to be evaluated by the team. |
This question is directly related to this topic. I have a very basic Toshiba laptop that is running Docker for Windows and Microsoft IoT Edge runtime. The laptop is connected to the Internet via a USB-connected wireless hot spot. I have three Edge modules running in their own Docker containers: $edgeHub, $edgeAgent, and a custom module. Everything was working perfectly yesterday, then $edgeHub and the custom module will no longer start. When I view the logs of $edgeHub, I see "Error creating or updating the cloud proxy for client ...". I figure the custom module won't start because of this error. Does anyone have any suggestions on how to get past this? A colleague has suggested that restarting the Docker daemon/Windows Service may work. He also said redeploying the module might work. Since $edgeHub is a system module, I don't know how to redeploy it. RESOLVED What worked for me was to open a command window and issue the following commands: docker rm -f edgeAgent I then restarted the Edge application on the laptop, and the app was back. I verified through the portal UI that they were running. |
IF running windows container for IoT Edge runtime and modules, sometimes the container doesn't sync time with host. This time sync issue is really dynamic, it occurs sometimes, not always.
Once it happens, restarting docker service won't help. It requires machine reboot to recover.
Since edge runtime requires secure connection with IoT Hub, hence the time synchronization of IoT Hub DeviceClient does matter. If the client device time goes ahead (or behind) too much, IoT Hub will reject such connection from client. Then we'll got operation timeout at client side.
Is there any way to enforce time sync with host on Windows container ?
Or can edge runtime enforce/ensure this time sync with host ?
There are many discussion on this "time sync" topic for Linux container, but unfortunately, I cannot find one for "Windows container". Even if there are ways to fix time sync issue in Windows container, we might not able to touch the code or image of edge runtime.
The text was updated successfully, but these errors were encountered: