iotedge: edgeHub race condition on startup - modules cannot send messages for 5 minutes after device deployment

Expected Behavior

When an IoT Edge device is deployed, the modules specified in the deployment are started. If module docker images are already downloaded, the starting of those modules is very quick. This means that $edgeHub is started almost immediately after the edge device is deployed because "startupOrder" : 0 is specified for edgeHub in the deployment. Also per deployment specification, my custom module is started after $edgeHub (no explicit startupOrder in deployment). Shortly after my custom module starts, it sends a telemetry channel message using the C IoT SDK IoTHubModuleClient_LL_SendEventAsync() function. The module checks the return value from this function call to verify that it is IOTHUB_CLIENT_OK. So, from my custom module perspective, all should be OK and the message should be received a short time later in the cloud IoT Hub.

Current Behavior

About half of the time, the cloud IoT Hub never receives that first message. I ensured that all routing from the hub is turned off and no one is consuming the message. I am using Azure IoT Explorer to listen to all telemetry messages on the hub to see if the message is received in the cloud or not. Whether the message is received in the cloud depends on whether edgeHub module had a startup error preventing it from setting up a default route immediately on startup.

The return value for IoTHubModuleClient_LL_SendEventAsync() function is always the same, indicating success. There does not appear to be any other C IoT SDK API to find out if the edgeHub has created the default route to know if it’s OK to send telemetry messages.

Steps to Reproduce

Provide a detailed set of steps to reproduce the bug.

  1. Create a deployment with edgeAgent, edgeHub ("startupOrder" : 0), and a custom module which sends telemetry messages shortly after startup.
  2. Create an IoT Edge device with this deployment. I use X.509 with DPS to automate this process when iotedge starts
  3. Stop iotedge process and delete this device from IoTHub
  4. Restart iotedge process which will re-create the device in IoT Hub. The deployment will follow soon after. Once the edge device has the deployment, modules will start VERY quickly since docker images are already on the device
  5. Observe edgeHub log to know whether default route was created on startup or not. You can see the effect of that in IoT Hub in the cloud which will either receive the telemetry message or not.

Context (Environment)

Output of iotedge check

Configuration checks
--------------------
_ config.yaml is well-formed - OK
_ config.yaml has well-formed connection string - OK
_ container engine is installed and functional - OK
_ config.yaml has correct hostname - OK
_ config.yaml has correct URIs for daemon mgmt endpoint - OK
_ latest security daemon - OK
_ host time is close to real time - Warning
    Could not query NTP server
_ container time is close to host time - OK
_ DNS server - OK
_ production readiness: identity certificates expiry - OK
_ production readiness: certificates - Warning
    The Edge device is using self-signed automatically-generated development certificates.
    They will expire in 24 days (at 2021-09-13 17:30:14 UTC) causing module-to-module and downstream device communication to fail on an active deployment.
    After the certs have expired, restarting the IoT Edge daemon will trigger it to generate new development certs.
    Please consider using production certificates instead. See https://aka.ms/iotedge-prod-checklist-certs for best practices.
_ production readiness: container engine - OK
_ production readiness: logs policy - OK
_ production readiness: Edge Agent's storage directory is persisted on the host filesystem - Warning
    The edgeAgent module is not configured to persist its /tmp/edgeAgent directory on the host filesystem.
    Data might be lost if the module is deleted or updated.
    Please see https://aka.ms/iotedge-storage-host for best practices.
_ production readiness: Edge Hub's storage directory is persisted on the host filesystem - Warning
    The edgeHub module is not configured to persist its /tmp/edgeHub directory on the host filesystem.
    Data might be lost if the module is deleted or updated.
    Please see https://aka.ms/iotedge-storage-host for best practices.

Connectivity checks
-------------------
_ host can connect to and perform TLS handshake with DPS endpoint - OK
_ host can connect to and perform TLS handshake with IoT Hub AMQP port - OK
_ host can connect to and perform TLS handshake with IoT Hub HTTPS / WebSockets port - OK
_ host can connect to and perform TLS handshake with IoT Hub MQTT port - OK
_ container on the default network can connect to IoT Hub AMQP port - OK
_ container on the default network can connect to IoT Hub HTTPS / WebSockets port - OK
_ container on the default network can connect to IoT Hub MQTT port - OK
_ container on the IoT Edge module network can connect to IoT Hub AMQP port - OK
_ container on the IoT Edge module network can connect to IoT Hub HTTPS / WebSockets port - OK
_ container on the IoT Edge module network can connect to IoT Hub MQTT port - OK

21 check(s) succeeded.
4 check(s) raised warnings. Re-run with --verbose for more details.

Device Information

  • Ubuntu 18.04
  • amd64
  • Linux containers

Runtime Versions

  • iotedge 1.1.4
  • mcr.microsoft.com/azureiotedge-agent 1.1 97834f10b7b0
  • mcr.microsoft.com/azureiotedge-hub 1.1 a5600e89bf20
  • Docker/Moby
Client:
 Version:           20.10.8+azure
 API version:       1.41
 Go version:        go1.16.7
 Git commit:        3967b7d28e15a020e4ee344283128ead633b3e0c
 Built:             Thu Jul 29 13:55:47 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.8+azure
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.7
  Git commit:       75249d88bc107a122b503f6a50e89c994331867c
  Built:            Fri Jul 30 01:30:57 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.9+azure
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        4144b63817ebcc5b358fc2c8ef95f7cddd709aa7
 docker-init:
  Version:          0.19.0
  GitCommit:    

Logs

The cases where the message is received correspond to the following `edgeHub` log. You can see that 6 seconds after module start, the default route is created. Good case
<6> 2021-08-20 14:12:24.516 +00:00 [INF] - Starting refresh of device scope identities cache
<6> 2021-08-20 14:12:24.518 +00:00 [INF] - Version - 1.1.4.44136317 (cbeb53cf8b5889718c4724936f6d13ef5ceaac2e)
<6> 2021-08-20 14:12:24.519 +00:00 [INF] - OptimizeForPerformance=True
<6> 2021-08-20 14:12:24.519 +00:00 [INF] - MessageAckTimeoutSecs=30
<6> 2021-08-20 14:12:24.522 +00:00 [INF] - Loaded server certificate with expiration date of "2021-09-13T17:30:14.0000000+00:00"
<6> 2021-08-20 14:12:24.550 +00:00 [INF] - Using Asp Net server for metrics
<6> 2021-08-20 14:12:24.713 +00:00 [INF] - Created new message store
<6> 2021-08-20 14:12:24.715 +00:00 [INF] - Started task to cleanup processed and stale messages
<6> 2021-08-20 14:12:24.945 +00:00 [INF] - Created DeviceConnectivityManager with connected check frequency 00:05:00 and disconnected check frequency 00:02:00
<6> 2021-08-20 14:12:25.060 +00:00 [INF] - Initialized storing twin manager
<6> 2021-08-20 14:12:25.108 +00:00 [INF] - Initializing configuration
<6> 2021-08-20 14:12:25.176 +00:00 [INF] - New device connection for device PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:25.213 +00:00 [INF] - Client PaulgICO310swgw2/$edgeHub connected to edgeHub, processing existing subscriptions.
<6> 2021-08-20 14:12:25.401 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:26.282 +00:00 [INF] - Attempting to connect to IoT Hub for client PaulgICO310swgw2/$edgeHub via AMQP...
<4> 2021-08-20 14:12:26.380 +00:00 [WRN] - Empty edge hub configuration received. Ignoring...
<6> 2021-08-20 14:12:28.242 +00:00 [INF] - Exiting disconnected state
<6> 2021-08-20 14:12:28.294 +00:00 [INF] - Received device connected callback
<6> 2021-08-20 14:12:28.314 +00:00 [INF] - Device connected to cloud, processing subscriptions for connected clients.
<6> 2021-08-20 14:12:28.320 +00:00 [INF] - Processing subscriptions for client PaulgICO310swgw2/$edgeHub on device connected to cloud.
<6> 2021-08-20 14:12:28.321 +00:00 [INF] - Skipping PaulgICO310swgw2/$edgeHub for subscription processing, as it is currently being processed.
<6> 2021-08-20 14:12:28.348 +00:00 [INF] - Entering connected state
<6> 2021-08-20 14:12:28.359 +00:00 [INF] - Cloud connection for PaulgICO310swgw2/$edgeHub is True
<6> 2021-08-20 14:12:28.368 +00:00 [INF] - Connection status for PaulgICO310swgw2/$edgeHub changed to ConnectionEstablished
<6> 2021-08-20 14:12:28.374 +00:00 [INF] - Client PaulgICO310swgw2/$edgeHub connected to cloud, processing existing subscriptions.
<6> 2021-08-20 14:12:28.374 +00:00 [INF] - Skipping PaulgICO310swgw2/$edgeHub for subscription processing, as it is currently being processed.
<6> 2021-08-20 14:12:28.381 +00:00 [INF] - Created cloud proxy for client PaulgICO310swgw2/$edgeHub via AMQP, with client operation timeout 20 seconds.
<6> 2021-08-20 14:12:28.394 +00:00 [INF] - Initialized cloud proxy 2501b05a-7a24-471d-8f79-2aad955d2208 for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:28.399 +00:00 [INF] - Created cloud connection for client PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:28.863 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:28.879 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:29.593 +00:00 [INF] - Created cloud endpoint iothub with max batch size 10 and fan-out factor of 10.
<6> 2021-08-20 14:12:29.948 +00:00 [INF] - Obtained edge hub config from module twin
<6> 2021-08-20 14:12:30.344 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:12:30.436 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2021-08-20 14:12:30.437 +00:00 [INF] - default: FROM /messages/* INTO $upstream
<6> 2021-08-20 14:12:30.442 +00:00 [INF] - Updated message store TTL to 2678400 seconds
<6> 2021-08-20 14:12:30.443 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2021-08-20 14:12:30.471 +00:00 [INF] - Started operation Get EdgeHub config
<6> 2021-08-20 14:12:30.472 +00:00 [INF] - Initialized edge hub configuration
The cases where the message is **NOT** received correspond to the following `edgeHub` log. You can see that 5 seconds after module start, the module throws an exception when processing twin desired properties. Due to the 300 second authentication timer, the module then waits 5 minutes before the default route is created. Bad case
<6> 2021-08-20 14:29:06.611 +00:00 [INF] - Version - 1.1.4.44136317 (cbeb53cf8b5889718c4724936f6d13ef5ceaac2e)                                                                                              [90/7592]
<6> 2021-08-20 14:29:06.612 +00:00 [INF] - OptimizeForPerformance=True                       
<6> 2021-08-20 14:29:06.612 +00:00 [INF] - MessageAckTimeoutSecs=30            
<6> 2021-08-20 14:29:06.615 +00:00 [INF] - Loaded server certificate with expiration date of "2021-09-13T17:30:14.0000000+00:00"
<6> 2021-08-20 14:29:06.631 +00:00 [INF] - Created device scope identities cache                                  
<6> 2021-08-20 14:29:06.642 +00:00 [INF] - Using Asp Net server for metrics                                         
<6> 2021-08-20 14:29:06.644 +00:00 [INF] - Starting refresh of device scope identities cache
<6> 2021-08-20 14:29:06.792 +00:00 [INF] - Created new message store
<6> 2021-08-20 14:29:06.793 +00:00 [INF] - Started task to cleanup processed and stale messages 
<6> 2021-08-20 14:29:07.037 +00:00 [INF] - Created DeviceConnectivityManager with connected check frequency 00:05:00 and disconnected check frequency 00:02:00
<6> 2021-08-20 14:29:07.153 +00:00 [INF] - Initialized storing twin manager
<6> 2021-08-20 14:29:07.193 +00:00 [INF] - Initializing configuration                               
<6> 2021-08-20 14:29:07.243 +00:00 [INF] - New device connection for device PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:29:07.279 +00:00 [INF] - Client PaulgICO310swgw2/$edgeHub connected to edgeHub, processing existing subscriptions.
<6> 2021-08-20 14:29:07.472 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/$edgeHub                                 
<4> 2021-08-20 14:29:08.430 +00:00 [WRN] - Empty edge hub configuration received. Ignoring...
<6> 2021-08-20 14:29:08.698 +00:00 [INF] - Attempting to connect to IoT Hub for client PaulgICO310swgw2/$edgeHub via AMQP...
<6> 2021-08-20 14:29:10.367 +00:00 [INF] - Exiting disconnected state
<6> 2021-08-20 14:29:10.419 +00:00 [INF] - Received device connected callback
<6> 2021-08-20 14:29:10.437 +00:00 [INF] - Device connected to cloud, processing subscriptions for connected clients.
<6> 2021-08-20 14:29:10.442 +00:00 [INF] - Processing subscriptions for client PaulgICO310swgw2/$edgeHub on device connected to cloud.
<6> 2021-08-20 14:29:10.444 +00:00 [INF] - Skipping PaulgICO310swgw2/$edgeHub for subscription processing, as it is currently being processed.
<6> 2021-08-20 14:29:10.472 +00:00 [INF] - Entering connected state
<6> 2021-08-20 14:29:10.482 +00:00 [INF] - Cloud connection for PaulgICO310swgw2/$edgeHub is True
<6> 2021-08-20 14:29:10.491 +00:00 [INF] - Connection status for PaulgICO310swgw2/$edgeHub changed to ConnectionEstablished
<6> 2021-08-20 14:29:10.496 +00:00 [INF] - Client PaulgICO310swgw2/$edgeHub connected to cloud, processing existing subscriptions.
<6> 2021-08-20 14:29:10.496 +00:00 [INF] - Skipping PaulgICO310swgw2/$edgeHub for subscription processing, as it is currently being processed.
<6> 2021-08-20 14:29:10.503 +00:00 [INF] - Created cloud proxy for client PaulgICO310swgw2/$edgeHub via AMQP, with client operation timeout 20 seconds.
<6> 2021-08-20 14:29:10.516 +00:00 [INF] - Initialized cloud proxy fddeb1a2-e024-47a0-99fb-265f08833988 for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:29:10.520 +00:00 [INF] - Created cloud connection for client PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:29:10.961 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:29:10.968 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<4> 2021-08-20 14:29:11.557 +00:00 [WRN] - Error getting edge hub config from twin desired properties
System.ArgumentException: schemaVersion is null or whitespace.
   at Microsoft.Azure.Devices.Edge.Util.Preconditions.CheckArgument(Boolean expression, String message) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Preconditions.cs:line 73
   at Microsoft.Azure.Devices.Edge.Util.Preconditions.CheckNonWhiteSpace(String value, String paramName) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Preconditions.cs:line 192
   at Microsoft.Azure.Devices.Edge.Hub.Core.Config.EdgeHubDesiredProperties..ctor(String schemaVersion, IDictionary`2 routes, StoreAndForwardConfiguration storeAndForwardConfiguration) in /home/vsts/work/1/s/edge-
hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/EdgeHubDesiredProperties.cs:line 14
   at lambda_method(Closure , Object[] )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator,
String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boole
an& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty c
ontainerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonPro
perty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at Microsoft.Azure.Devices.Edge.Hub.Core.Config.TwinConfigSource.GetConfigInternal() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/TwinConfigSource.cs:line 97
   at Microsoft.Azure.Devices.Edge.Hub.Core.Config.TwinConfigSource.GetConfigInternal() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/TwinConfigSource.cs:line 105
<4> 2021-08-20 14:29:11.630 +00:00 [WRN] - Empty edge hub configuration received. Ignoring...
<6> 2021-08-20 14:29:11.655 +00:00 [INF] - Started operation Get EdgeHub config
<6> 2021-08-20 14:29:11.656 +00:00 [INF] - Initialized edge hub configuration
<6> 2021-08-20 14:29:11.681 +00:00 [INF] - Starting timer to authenticate connections with a period of 300 seconds
<6> 2021-08-20 14:29:11.915 +00:00 [INF] - Scheduling server certificate renewal for "2021-09-13T17:27:44.0004097Z".
<6> 2021-08-20 14:29:11.919 +00:00 [INF] - Starting protocol heads - (MQTT, AMQP, HTTP)
<6> 2021-08-20 14:29:11.928 +00:00 [INF] - Starting MQTT head
<6> 2021-08-20 14:29:12.011 +00:00 [INF] - Initializing TLS endpoint on port 8883 for MQTT head.
<6> 2021-08-20 14:29:12.179 +00:00 [INF] - Starting AMQP head
<6> 2021-08-20 14:29:12.210 +00:00 [INF] - Started MQTT head
<6> 2021-08-20 14:29:12.481 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:29:12.516 +00:00 [INF] - Started AMQP head
<6> 2021-08-20 14:29:12.525 +00:00 [INF] - Starting HTTP head
<4> 2021-08-20 14:29:13.168 +00:00 [WRN] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
<6> 2021-08-20 14:29:13.191 +00:00 [INF] - Started HTTP head
<6> 2021-08-20 14:29:19.781 +00:00 [INF] - Client PaulgICO310swgw2/DaikinSoftwareGateway in device scope authenticated locally.
<6> 2021-08-20 14:29:19.822 +00:00 [INF] - Successfully generated identity for clientId PaulgICO310swgw2/DaikinSoftwareGateway and username Telemetry-cu-dev1-iot.azure-devices.net/PaulgICO310swgw2/DaikinSoftwareGa
teway/?api-version=2020-09-30&DeviceClientType=iothubclient%2f1.7.0%20(native%3b%20Linux%3b%20x86_64)
<6> 2021-08-20 14:29:19.841 +00:00 [INF] - ClientAuthenticated, PaulgICO310swgw2/DaikinSoftwareGateway, 4727c0dd
<6> 2021-08-20 14:29:19.931 +00:00 [INF] - New device connection for device PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:19.932 +00:00 [INF] - Client PaulgICO310swgw2/DaikinSoftwareGateway connected to edgeHub, processing existing subscriptions.
<6> 2021-08-20 14:29:19.990 +00:00 [INF] - Bind device proxy for device PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:19.992 +00:00 [INF] - Binding message channel for device Id PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:20.003 +00:00 [INF] - Attempting to connect to IoT Hub for client PaulgICO310swgw2/DaikinSoftwareGateway via AMQP...
<6> 2021-08-20 14:29:20.125 +00:00 [INF] - Processing subscriptions TwinResponse, Methods, ModuleMessages for client PaulgICO310swgw2/DaikinSoftwareGateway.
<6> 2021-08-20 14:29:20.126 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:20.178 +00:00 [INF] - Set subscriptions from session state for PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:20.206 +00:00 [INF] - Cloud connection for PaulgICO310swgw2/DaikinSoftwareGateway is True
<6> 2021-08-20 14:29:20.207 +00:00 [INF] - Connection status for PaulgICO310swgw2/DaikinSoftwareGateway changed to ConnectionEstablished
<6> 2021-08-20 14:29:20.207 +00:00 [INF] - Client PaulgICO310swgw2/DaikinSoftwareGateway connected to cloud, processing existing subscriptions.
<6> 2021-08-20 14:29:20.207 +00:00 [INF] - Skipping PaulgICO310swgw2/DaikinSoftwareGateway for subscription processing, as it is currently being processed.
<6> 2021-08-20 14:29:20.207 +00:00 [INF] - Created cloud proxy for client PaulgICO310swgw2/DaikinSoftwareGateway via AMQP, with client operation timeout 20 seconds.
<6> 2021-08-20 14:29:20.208 +00:00 [INF] - Initialized cloud proxy af7e5458-37cf-4ce8-8221-9545fe503a0d for PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:20.208 +00:00 [INF] - Created cloud connection for client PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:21.232 +00:00 [INF] - Processing subscriptions TwinResponse, Methods, ModuleMessages, DesiredPropertyUpdates for client PaulgICO310swgw2/DaikinSoftwareGateway.
<6> 2021-08-20 14:29:21.238 +00:00 [INF] - Processing pending subscriptions for PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:21.240 +00:00 [INF] - Set subscriptions from session state for PaulgICO310swgw2/DaikinSoftwareGateway
<6> 2021-08-20 14:29:23.063 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:33:56.201 +00:00 [INF] - Created cloud endpoint iothub with max batch size 10 and fan-out factor of 10.
<6> 2021-08-20 14:33:56.207 +00:00 [INF] - Obtained edge hub config patch update from module twin
<6> 2021-08-20 14:33:56.497 +00:00 [INF] - Updating edge hub configuration
<6> 2021-08-20 14:33:56.784 +00:00 [INF] - Updated reported properties for PaulgICO310swgw2/$edgeHub
<6> 2021-08-20 14:33:56.975 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2021-08-20 14:33:56.975 +00:00 [INF] - default: FROM /messages/* INTO $upstream
<6> 2021-08-20 14:33:56.980 +00:00 [INF] - Updated message store TTL to 2678400 seconds
<6> 2021-08-20 14:33:56.982 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2021-08-20 14:34:11.700 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2021-08-20 14:39:11.682 +00:00 [INF] - Entering periodic task to reauthenticate connected clients

Additional Information

Even in the “bad case” where the default route is not created right away, when the 5 minute delay expires and the default route is eventually created, further module telemetry messages are conveyed to the cloud without problems.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 23 (22 by maintainers)

Commits related to this issue

Most upvoted comments

There is no timeout for messages and events by default, but you can specify one with IotHubModuleClient_LL_SetOption(client, OPTION_MESSAGE_TIMEOUT, [some_value_in_ms]). I believe the callback should always be called eventually once the timeout is set.