Problem with Device Update for Azure IoT Hub "Unable to read connection String from configuration file"

473 Views Asked by At

I'am trying to complete this Tutorial (https://learn.microsoft.com/en-us/azure/iot-hub-device-update/device-update-raspberry-pi) about the Device Update for Azure IoT Hub.

I got everything to the point where I need to start the daemon. Starting works but then it is unable to read the connection-String from the configuration File.

File(du-config.json) looks like this:

{
  "schemaVersion": "1.0",
  "aduShellTrustedUsers": [
     "adu",
     "do"
  ],
  "manufacturer": "fabrikam",
  "model": "vacuum",
  "agents": [
     {
     "name": "main",
     "runas": "adu",
     "connectionSource": {
        "connectionType": "string",
        "connectionData": "<Connection String>"
     },
     "manufacturer": "fabrikam",
     "model": "vacuum"
     }
  ]}

<Connection String> is obviously the primary connection String from my IoT Hub Device.

From the Logfile I get this:

Mar 02 15:54:18 raspberrypi3 systemd[1]: Started ADU Client service..
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9750Z [E] Unable to read connection string from configuration file [GetConnectionInfoFromADUConfigFile]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9746Z [I] Agent (linux; 0.6.0-public-preview) starting. [main]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9747Z [I] Agent built with handlers: microsoft/swupdate. [main]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9751Z [I] Agent exited with code 0 [main]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9752Z [I] Agent is shutting down with signal 0. [ShutdownAgent]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9752Z [I] ADUC agent stopping [AzureDeviceUpdateCoreInterface_Destroy]
Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: Error: Time:Wed Mar  2 15:54:18 2022 File:/usr/src/debug/azure-iot-sdk-c/1.0+gitAUTOINC+b82d3db106-r0/git/c-utility/adapters/tlsio_openssl.c Func:openssl_static_locks_uninstall Line:585 Locks
already uninstalled
Mar 02 15:54:19 raspberrypi3 systemd[1]: adu-agent.service: Succeeded.

What am I doing Wrong?

Happy to provide more details but I don't know what to look for exactly.

SOLVED:

In the logfile you can see on line 3

Mar 02 15:54:18 raspberrypi3 AducIotAgent[206]: 2022-03-02T15:54:18.9746Z [I] Agent (linux; 0.6.0-public-preview) starting. [main]

it shows 0.6.0-private-preview instead of 0.8.0-private-preview.

In order to fix this, you need to download the 0.8.0 image from the Git

Then it should work.

0

There are 0 best solutions below