IoT Edge certificate management

Makowiecki Adrian 0 Reputation points
2025-03-05T14:17:05.07+00:00

I want to find a way to renew IoT Edge certificates manually, to prevent automatic edge reboots.

I set up a test EST server as described on here and confirmed it is working by running openssl s_client -showcerts -connect localhost:8085 and getting a certificate in response.

When I tried to remove certificates to renew them new certificate files are not created and there are errors in iotedge system logs:

Mar 04 16:15:54 device-name aziot-certd[807771]: 2025-03-04T16:15:54Z [ERR!] - !!! internal error
Mar 04 16:15:54 device-name aziot-certd[807771]: 2025-03-04T16:15:54Z [ERR!] - !!! caused by: could not create cert
Mar 04 16:15:54 device-name aziot-certd[807771]: 2025-03-04T16:15:54Z [ERR!] - !!! caused by: EST endpoint did not return successful response: 401 Unauthorized b"Error 401: Unauthorized\nThe server was unable to authorize the request.\n"
Mar 04 16:15:54 device-name aziot-certd[807771]: 2025-03-04T16:15:54Z [INFO] - --> 500 {"content-type": "application/json"}
Mar 04 16:15:54 device-name aziot-identityd[810605]: 2025-03-04T16:15:54Z [ERR!] - Failed to provision with IoT Hub, and no valid device backup was found: internal error
Mar 04 16:15:54 device-name aziot-identityd[810605]: 2025-03-04T16:15:54Z [ERR!] - service encountered an error
Mar 04 16:15:54 device-name aziot-identityd[810605]: 2025-03-04T16:15:54Z [ERR!] - caused by: internal error
Mar 04 16:15:54 device-name aziot-identityd[810605]: 2025-03-04T16:15:54Z [ERR!] - caused by: could not create certificate
Mar 04 16:15:54 device-name aziot-identityd[810605]: 2025-03-04T16:15:54Z [ERR!] - caused by: internal error


My main goal is to avoid automatic restarts of the iotedge modules, I will appreciate help. Here is my config.toml

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.
594 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.