We have devices connected to IoT Hub via MQTT (default settings) and they all keep reconnecting precisely every 65 minutes (to the millisecond).
Device app details:
- .net Core 2.1
- Libraries:
Microsoft.Azure.Devices v1.17.0
Microsoft.Azure.Devices.Client v1.18.0
- Connection Type: MQTT
- OS: Windows 10 IoT Enterprise (Dell Industrial PC), Raspbian (Raspberry PI 3) and Windows IoT Core (Raspberry PI 3) - All behave the same.
We are using the free version/tier of IoT Hub.
When the reconnection occurs:
DeviceClient StatusChangesHandler
reports ConnectionStatus:Disconnected_Retrying
and Reason:No_Network
- IoT Hub Diagnostics reports
deviceDisconnect
=>404104 DeviceConnectionClosedRemotely
deviceConnect
=>401003 IoTHubUnauthorized
deviceConnect
=> No error, successful
DeviceClient StatusChangesHandler
reports ConnectionStatus:Connected
and Reason:Connection_Ok
This is not a highly critical issue for our operation since at this stage it is a PoC and each reconnect takes about 2 seconds but, we'd like to know the root cause of this behaviour before we go live.