Open FinitelyFailed opened 2 weeks ago
I'm still having this issue. It this repo abandoned? Should I look for answers elsewhere?
Seems like the version of azure-iot-sdk-c is 1.9 from the hash in the logs providerd, 7329f70906, which is not an LTS release.
The version of azure-iot-sdk for c supported by iot-hub-device-update ver 1.0.2 was the older LTS_07_2021_Ref01 as can be seen here: https://github.com/Azure/iot-hub-device-update/blob/2d1f03671d45be1e55b89c940514ffe91b3227e0/scripts/install-deps.sh#L46C15-L46C32
Was the DU agent installed from 1.2 debian package, or built from sources?
Anyways, this is error 0x5 Not Authorized coming back from iot-hub MQTT server in the CONACK MQTT packet, so whatever cred received from AIS and sent to the MQTT server is not considered authorized by iothub MQTT server
Is this use of AIS based on symmetric keys or x509.certs? If the former, something may be going on with the token generation in AIS, or a bug in the version of the iothub sdk.
This is troubleshooting issue with AIS and iot-hub-sdk-for-c, so you could get faster support opening an issue at https://github.com/Azure/azure-iot-sdk-c/issues and/or https://github.com/Azure/iot-identity-service
Hi,
Thanks for your answer!
Seems like the version of azure-iot-sdk-c is 1.9 from the hash in the logs providerd, 7329f70906, which is not an LTS release.
The version of azure-iot-sdk for c supported by iot-hub-device-update ver 1.0.2 was the older LTS_07_2021_Ref01 as can be seen here: https://github.com/Azure/iot-hub-device-update/blob/2d1f03671d45be1e55b89c940514ffe91b3227e0/scripts/install-deps.sh#L46C15-L46C32
Was the DU agent installed from 1.2 debian package, or built from sources?
We build from source. As we build our own Linux based OS with the help of Yocto, we use recepices from https://github.com/GaiaSystem/meta-azure-device-update (which is a fork of https://github.com/Azure/meta-azure-device-update). We have OS:s based on Dunfell and Kirkstone at the moment, both seems to be running 1.0.2 of ADU. It seems that we use code from this repo from the commits:
Anyways, this is error 0x5 Not Authorized coming back from iot-hub MQTT server in the CONACK MQTT packet, so whatever cred received from AIS and sent to the MQTT server is not considered authorized by iothub MQTT server
Is this use of AIS based on symmetric keys or x509.certs? If the former, something may be going on with the token generation in AIS, or a bug in the version of the iothub sdk.
This is troubleshooting issue with AIS and iot-hub-sdk-for-c, so you could get faster support opening an issue at https://github.com/Azure/azure-iot-sdk-c/issues and/or https://github.com/Azure/iot-identity-service
We use symmetric keys. And we use AIS to get credentials to connect our own software to the IoT hub, which is seems to be very stable. I do not think that AIS is the problem.
The problem is that we do not know which version of ADU (in our case which commit) that should be used. I find it hard to find any info about LTS versions etc.
And what is bit worrying is that I can't get our device to work. The one which got the "error 0x5 Not Authorized" error. If I could clear some cache, restart something etc. etc. to get DU on device to work again I would feel a bit better, as we have a bunch of devices in production running the same version of DU.
Expected Behavior
deviceupdate-agent should connect to the IoT hub, using the azure identity service to get a connection string.
Current Behavior
This happened on one of our test devices. We have multiple devices running, the other ones work fine. But this one stopped working about a week ago. deviceupdate-agent can not connect to the IoT hub as it gets a "Connection Not Accepted" error.
Device Information
Logs
Additional Information
I have rebooted the computer, restarted the deviceupdate-agent, with no change in behavior.
The deviceupdate-agent is setup as a "Module Identity" on the device in the IoT hub.
We have a parallel connection to the device in the IoT hub for our software, which is able to connect to the IoT hub without an problems.