I've set my device from test environment to run device update agent as a identity module. I copied primary connection string from my device identity module from iothub and set it on my device du-config.json. It worked, I can see the identity module as connected.
Now I see for production scenarios I should use identity service for device provisioning. I've installed it on my device and now I need to edit config.toml to set connection properties. For now, all I have is my device connection string and my agent as module identity connection string, but I'm not sure which one to use on identity service connection_string under source = "manual". The module Identity connection string gives me errors, so I guess device connection should be the correct one.
But even using device connection string on config.toml from identity service and erasing my module identity connection string from the du-config.json and setting property "connection type" from string to AIS, my agent module identity does not come connected, I'm not sure how the module will be found since there is no module identity connection set anywhere. In the device update agent logs I see:
[E] Invalid connection info. [HealthCheck]
[E] Agent health check failed. [main]
[D] Log file created: /var/log/adu/du-agent.20231009-150417.log [zlog_init]
[I] Agent (linux; 1.0.2) starting. [main]
[I] Git Info: HEAD:2d1f0367 [main]
[I] Supported Update Manifest version: min: 4, max: 5 [main]
Error: Time:Mon Oct 9 17:04:17 2023 File:/tmp/azure-iot-sdk-c/c-utility/adapters/socketio_berkeley.c Func:initiate_socket_connection Line:353 Failure: connect failure 13.
Error: Time:Mon Oct 9 17:04:17 2023 File:/tmp/azure-iot-sdk-c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:829 lookup_address_and_connect_socket failed
Error: Time:Mon Oct 9 17:04:17 2023 File:/tmp/azure-iot-sdk-c/deps/uhttp/src/uhttp.c Func:uhttp_client_open Line:1134 opening xio failed
[I] Failed to provision a connection string from eis, Failed with error EISErr_ConnErr on service EISService_IdentityService [GetConnectionInfoFromIdentityService]
Can you please clarify what I am missing, please?
To set the device update agent as an identity module to work with the identity service, you need to edit the configuration file for Device Update by running the command below :
Change the connection type to "AIS" for agents who will be using the IoT Identity Service for provisioning. The ConnectionData field must be an empty string.
Note: All values with the 'Place value here' tag must be set. See Configuring a DU agent. you should use the device connection string on
config.toml
from the identity service and erase the module identity connection string from the du-config.json.If you are using the IoT Identity service to provision the device, you can configure the Device Update agent with "connectionType": "AIS" and connectionData as a blank string in the configuration file.