IoT Edge Module gives Unable to retrieve logs error

Satyam Chauhan 537 Reputation points
2024-05-02T13:59:28.3733333+00:00

Hi,

I have deployed a custom c# IoT edge module and I can see the module as running in the IoT Hub. But the module is not running, on checking the logs from IoT hub troubleshoot option it gives the following error:

Screenshot 2024-05-02 192400

How can I fix this issue ?

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
548 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,138 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 29,931 Reputation points MVP
    2024-05-02T17:58:20.94+00:00

    Hello @Satyam Chauhan,

    welcome to this moderated Azure community forum.

    The short answer is logging into the device and checking the logs on the machine itself.

    Only when the device is running in a stable way while logging, even when the functionality fails, this log can be read.

    You need to log into the device and check the log there.

    You could try locally:

    sudo iotedge logs TagDataProcessor -f

    but that will probably fail also (it's basically the same logging).

    So check the edgeAgent too

    sudo iotedge logs edgeAgent -f

    As an alternative, go back to the previous working version of the module or deploy another working module so you can be sure both the EdgeAgent and EdgeHub are working as expected.

    It's a good thing to have a second way to connect to the device so you can log in into the operating system.

    This could be done with a combination of AutoSSH and a stepping stone/jump box (a VM in the cloud where the edge device is connecting to using an outbound connection), a VPN , or Azure Arc.

    As an alternative, you could try OSConfig.

    This way, you are not depending on stability of the Azure IoT Edge runtime only.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    0 comments No comments

0 additional answers

Sort by: Most helpful