none
Error Could not get an active IoT Hub Connection for client (DeviceID) RRS feed

  • Question

  • Hi 

    In the cloud we have 

    1- one IoT Hub

    2 - Two Devices  DeviceA and DeviceB

    3- One Iot Edge within the IoT Hub

    4- As a test we only hooked up one DeviceB as a Child to the IoT Edge

    On Prem Win 10 we have

    1- Simulator

    2- IoT Edge

    We tested doing 

    Test one (No Iot Edge, DeviceA only): we started the simulator, and it did communicate with the device and telemetry data did go to the deviceA in IoT Hub, working perfectly no problem

    Test two (We added Iot Edge for DeviceA): On-prem win 10 we added a IoT edge with a transparent gateway, then we added an Iot Edge in the Iot Hub, on the first run everything went well, then we restarted the Win 10 on-prem, then Iot Edge On-prem did not authenticate the connection, so we understood that we need to add IoT Edge as a PARENT for the deviceA, so we ran everything and the edge was able to re-authenticate.

    So we ran everything again and the simulator messages that it has re-authenticated and and the simulator can see the Iot Edge in Win10 , BUT the edge in Win 10 generated an error saying ...."Could Not get and Active IoT Hub connection for client (Device ID)"

    What happens when the device gets restarted.

    Can someone help

    Sincerely

    Nik

    we set the DeviceB as a child in within Iot Hub so now my IoT Edge in IoT has one child DeviceB


    Sincerely Nik -- Please kindly mark the post(s) that answered your question and/or vote for the post(s). http://sqldataside.blogspot.ca/ (SQL Tabular + PowerShell)

    Monday, August 5, 2019 4:04 PM

All replies

  • Hello Nik,

    To address your issue, could you please share the documentation that you are following if any? How did you add an IoT Edge to a device A?

    Tuesday, August 6, 2019 2:34 PM
    Moderator
  • Hi Ashok,

    Thanks for replying back.

    I followed the document "Configure an IoT Edge device to act as a Transparent Gateway"

    https://docs.microsoft.com/en-ca/azure/iot-edge/how-to-create-transparent-gateway

    I have setup the IoT Edge on Windows 10 Pro 1809 on Hyper-V virtual machine.

    I have an application which runs in Windows and act as a device and send telemetry data to IOT Edge through MQTT.

    After installing the IOTEdge on Win10, I was able to connect and send data to IOTEdge and to the IOT Hub on the cloud. Disconnecting the internet access interrupted the communication but it recovered after reconnecting internet. Even restarting the PC was okay and i could still connect to IOTEdge till i shutdown the PC.

    After restarting the PC, I couldn't transfer data to IOTEdge anymore as my device was not authorized. I had the following error on EdgeHub "Error validating token for <Device ID> with IoTHub".

    I thought creating Parent/Child relationship will help so I did it. It helped with connection between my device and IOT Edge and my device was able to send data but data couldn't get passed IOTEdge to IOT hub and got the following errors on EdgeHub:

    "Error creating cloud connection for client <Device ID>"

    "Could not get an active IoT Hub connection for client <Device ID>"

    The Edgehub constantly tries to connect to the Device and generates the same errors.

    Regards,

    Ben


    Tuesday, August 6, 2019 7:46 PM
  • To understand if there is an issue with downstream device or an IoT Edge, can you place the downstream device on another machine and check?

    Wednesday, August 7, 2019 11:06 AM
    Moderator
  • Morning Ashok,

    The downstream device works fine connecting to IoT Hub directly on the same machine but can't make it through IoT Edge.

    I suspect either issue is firewall; but i have disabled the firewall and didn't make any difference; or the issue is 'nat' switch in virtual machine.

    Seems 'nat' is not connected to internet. Not sure how to check it or connect it to internet.

    Regards,

    Ben

    Wednesday, August 7, 2019 2:05 PM
  • Hello Ben,

    Please check the documentation Configure an IoT Edge device to communicate through a proxy server and see if you are missing any configuration.

    Also, see Common issues and resolutions for Azure IoT Edge and Test the gateway connection for more detailed troubleshooting steps.

    Let us know if that helps.

    Monday, August 12, 2019 11:28 AM
    Moderator