My IOT edge device is not connecting to my IOT hub

shahyan bharucha 0 Reputation points

Hi All,

I am having an issue with connecting my IO-link master to my Azure IOT hub. For some reason the device tries to but never connects. I checked the Azure logs and its giving internal server error when the device is trying to connect.

I also tried the same with Device Simulation and getting same error.

"Device simulation in progress: 12%|# | 12/100 [01:08<09:14, 6.30s/it]Exception caught in background thread. Unable to handle.
['azure.iot.device.common.transport_exceptions.ConnectionDroppedError: Unexpected disconnection\n']"

2023-03-15 13_12_12-Monitor - Microsoft Azure

If I try the same connection details using my Colleagues IOT hub connection then I get a stable connection. I tried with the tech support and we were not able to get an answer on this.

I will appreciate your insight on what's happening and how I can get it solved.

Thank you very much.

Best Regards,

Shahyan Bharucha

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
377 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,112 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,456 Reputation points

    Hi @shahyan bharucha , Greetings! We are not sure if the issue is resolved from your end. There could be a lot of reasons why you would see a 500xxx Internal errors. The issue is most likely transient. Here are a few things we can consider mitigating the issue.

    • If you are using a SAS based authentication for the IoT Edge devices, make sure you are not testing the connection from two devices simultaneously. Testing the connection from multiple devices would lead to the following error Exception caught in background thread. Unable to handle. This will break the connection from one of the devices as there are two devices simultaneously trying to connect to the same IoT Device on Azure with the same authentication.
    • I noticed a BadRequest error coming from the category DeviceTelemetry in the image you have attached in one of the comments. Considering the huge volumes of telemetry data coming to the platform this would cause an issue if unchecked. For best practice on transient fault handling and retries, see Transient fault handling
    • It is also recommended the devices to be on the latest version of the Azure IoT SDKs to automatically manage retries in case of disconnects.
    • If you see a scenario where you notice frequent disconnects from the device, it is advised to implement Exponential back-off with jitter retry policy with the SDK as this retry policy tends to be aggressive at the start and slow down over time until it reaches a maximum delay. For more information, please take a look at the Retry Pattenrs and adopt one that suits you best.

    If the issue is still unresolved, please do not hesitate to reach out to us. We would be glad to connect with you offline and help you resolve this.

    If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    0 comments No comments