Azure / azure-iot-hub-node

Azure IoT Hub Data Plane Node SDK
MIT License
2 stars 9 forks source link

Client.open() fails with "rhea: connection disconnected" #31

Open edonosotti opened 1 year ago

edonosotti commented 1 year ago

Description of the issue

All of a sudden, in one of our environments any attempt to invoke a Direct Method on any device in the fleet consistently failed. Searching into the logs we found out that the Client.open() method of the SDK failed after ~4 minutes with the following error:

{"message": "rhea: connection disconnected", "code": ""}

Notes:

References

This issue is also similar to this one reported for azure-iot-sdk-node in 2020. Note this comment from @anthonyvercolano:

The problem where you see d2c continuing (likely after some sort of error recovery) but c2d no longer works is likely a bug on our part. Hard to reproduce, but I've seen it before. Could at its root level be caused by transient network issues OR the service moving processing between nodes.

This was somewhat our situation. We could consistently receive device-to-cloud (D2C) messages, but weren't able to invoke Direct Methods on the devices. The comment above mentions cloud-to-device (C2D) messages, but both Direct Methods and C2D messages requires the application to connect to the IoT Hub first to send either of them.

Thank you for your time and I appreciate any advice you could share!

edonosotti commented 8 months ago

We are still getting these errors, intermittently, across all environments and different Hubs. Sometimes it lasts for days. This issue has been pending for 6 months now, any chance that we might get answers eventually?