0

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.

  • Can you confirm, the file name which you have specified is du-config.json or do-config.json? Two configuration files must be on the device so that Device Update for IoT Hub configures properly. The first file is the du-config.json file, which must exist at /adu/du-config.json. The second file is the du-diagnostics-config.json file, which must exist at /adu/du-diagnostics-config.json. – AshokPeddakotla Mar 03 '22 at 15:51
  • Sry Typo its 'du-config.json' – Roland Lux Mar 07 '22 at 07:41
  • Found my mistake. I didn't use the 0.8.0 release. I used the 0.6.0 and this version is looking for the adu-conf.txt file. – Roland Lux Mar 07 '22 at 08:08
  • Glad to hear you have found the mistake and resolved it. You can update the detailed steps as answer and accept it. So it can benefit the community reading this post. – AshokPeddakotla Mar 07 '22 at 09:09

0 Answers0