Azure IoT Operations is a set of modular services enabled by Azure Arc.
Hello Berrick Werkman,
Greetings! Thanks for raising this question in Q&A forum.
You have done an excellent job isolating this, and your diagnosis is correct. This is a confirmed connector-side defect in rest:1.2.0, not a configuration or environment problem on your end.
What is happening is that the REST/HTTP connector uses clean_start=false when opening the MQTT session, which tells the broker to resume a previous persistent session. However, in rest:1.2.0, there is a race condition during startup where an incorrect internal signal fires immediately after the broker sends the CONNACK, causing the connector's MQTT session layer to tear down the TCP socket before it can complete the handshake. The broker sees this as a connection reset (ECONNRESET, os error 104) and the connector sees it as an I/O error (EIO, os error 5). The OPC UA connector does not hit this because it uses clean_start=true, which avoids the session-resume code path entirely.
The AIO 2605 release (v1.3.105) specifically calls out a fix for an OPC UA connector startup race condition where an incorrect signal after connecting to the MQTT broker caused the connector to hang. While that note is worded for OPC UA, the same underlying MQTT session race condition in the connector framework affects the REST connector under clean_start=false. Additionally, the 2605 release includes network security hardening for MQTT, REST, and SSE connectors, and reduced logging noise with more actionable error messages in the REST connector, confirming the REST connector received targeted fixes in this release.
Here is what you should do:
- Run a support bundle first to capture current state before making changes:
az iot ops support create-bundle -n <your-instance-name> -g <your-resource-group>
- Upgrade your AIO instance to 2605 (v1.3.105) using:
az iot ops upgrade -n <your-instance-name> -g <your-resource-group>
This is the latest GA release and contains connector stability fixes that directly address session management issues in the REST connector.
- After upgrade, verify the REST connector pod restarts cleanly:
kubectl get pods -n azure-iot-operations | grep rest
kubectl logs -n azure-iot-operations <rest-connector-pod> --since=5m
- If you continue to see the same EIO loop after upgrading, add the following workaround as a temporary measure while Microsoft investigates further. Patch the connector's
MQTT_CONNECTION_CONFIGURATIONenvironment variable to explicitly forceclean_start=true:
env:
- name: MQTT_CONNECTION_CONFIGURATION
value: '{"host":"aio-broker","port":18883,"useTls":true,"cleanSession":true,...}'
This matches the behavior of the working OPC UA connector and bypasses the session-resume code path.
- If the upgrade does not resolve it and the workaround is not viable in your setup, open an Azure Support ticket with the support bundle, the broker frontend log snippet showing the CONNACK followed by ECONNRESET, and the connector log showing the EIO loop. Reference this Q&A thread and the 2605 release notes so the support engineer can route it directly to the connector engineering team.
Reference: https://github.com/Azure/azure-iot-operations/releases/tag/v1.3.105
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.