You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand Edge CA renewal guidance and add troubleshooting entry
- Expand 'Plan for Edge CA renewal' section with timing table, restart
sequence details, and module resilience best practices
- Add troubleshooting entry for custom modules losing connectivity after
Edge CA certificate renewal
- Link to IoT Hub SDK retry documentation for connection resilience
Addresses recurring community issue (Azure/iotedge#7497, #7321, #6044,
#6008, #7446) where custom modules stop sending messages after the
30-day Edge CA renewal cycle.
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-manage-device-certificates.md
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ titleSuffix: Azure IoT Edge
4
4
description: How to install and manage certificates on an Azure IoT Edge device to prepare for production deployment.
5
5
author: sethmanheim
6
6
ms.author: sethm
7
-
ms.date: 03/23/2026
7
+
ms.date: 04/13/2026
8
8
ms.topic: concept-article
9
9
ms.service: azure-iot-edge
10
10
services: iot-edge
@@ -396,7 +396,28 @@ You can provide your own certificates and manage them manually. However, to avoi
396
396
397
397
When the Edge CA certificate renews, it regenerates all the certificates it issued, like module server certificates. To give the modules new server certificates, IoT Edge restarts all modules when the Edge CA certificate renews.
398
398
399
-
To minimize the potential negative effects of module restarts, plan to renew the Edge CA certificate at a specific time (for example, `threshold = "10d"`) and notify dependents of the solution about the downtime.
399
+
The renewal happens automatically based on the `auto_renew` threshold you configure. The following table shows when renewal occurs for common certificate lifetimes, using the default threshold of `80%`:
| 90 days | 80% | Day 72 (18 days before expiry) |
404
+
| 30 days | 80% | Day 24 (6 days before expiry) |
405
+
| 7 days | 80% | Day 5.6 (~34 hours before expiry) |
406
+
407
+
During the renewal, the IoT Edge runtime:
408
+
409
+
1. Regenerates the Edge CA certificate.
410
+
1. Stops all running modules.
411
+
1. Restarts each module so it receives a new server certificate.
412
+
413
+
This restart cycle causes a brief disruption. Custom modules that connect to EdgeHub must reconnect after the restart. If a module doesn't implement connection retry logic, it might fail to reestablish communication with EdgeHub and stop sending messages.
414
+
415
+
To minimize the potential negative effects of module restarts:
416
+
417
+
-**Schedule renewal for a maintenance window.** Set `threshold` to an absolute time (for example, `threshold = "10d"`) so the renewal happens at a predictable point before expiry.
418
+
-**Implement connection retry in custom modules.** Modules should use the Azure IoT device SDK's built-in retry policies, or implement their own exponential backoff retry logic, to automatically reconnect to EdgeHub after a restart. For more information, see [Manage connectivity and reliable messaging by using Azure IoT Hub device SDKs](../iot-hub/iot-hub-reliability-features-in-sdks.md).
419
+
-**Set the module restart policy to `always`.** In your deployment manifest, set `"restartPolicy": "always"` for each custom module so the container runtime restarts modules that fail after the certificate renewal cycle.
420
+
-**Notify dependents of downtime.** If your solution has upstream services or dashboards that consume IoT Edge module telemetry, notify those dependents that a brief disruption will occur during the renewal window.
400
421
401
422
### Example: use Edge CA certificate files from PKI provider
description: Resolve common issues in Azure IoT Edge solutions. Learn how to troubleshoot issues with provisioning, deployment, the IoT Edge runtime, and networking.
4
4
author: sethmanheim
5
5
ms.author: sethm
6
-
ms.date: 03/03/2026
6
+
ms.date: 04/13/2026
7
7
ms.topic: troubleshooting-general
8
8
ms.service: azure-iot-edge
9
9
services: iot-edge
@@ -378,6 +378,30 @@ If you change the TTL value for your application to a value that's shorter than
378
378
379
379
To configure the *MessageCleanupIntervalSecs* value, set the environment variable in the deployment manifest for the IoT Edge hub module. For more information about setting runtime environment variables, see [Edge Agent and Edge Hub Environment Variables](https://github.com/Azure/iotedge/blob/main/doc/EnvironmentVariables.md).
380
380
381
+
### Custom modules stop sending messages after Edge CA certificate renewal
382
+
383
+
#### Symptoms
384
+
385
+
Custom modules stop communicating with EdgeHub after running for a period of time, typically around 24-30 days when using the default 30-day quickstart Edge CA certificate, or at 80% of the configured certificate lifetime. The EdgeHub and EdgeAgent modules continue to run, but custom modules can no longer send or receive messages through EdgeHub.
386
+
387
+
#### Cause
388
+
389
+
When the Edge CA certificate auto-renews, IoT Edge stops and restarts all modules so they receive new server certificates. After the restart, modules must reestablish their connection to EdgeHub. If a custom module doesn't implement connection retry logic, the module starts but can't reconnect to EdgeHub because the new EdgeHub server certificate isn't yet available or the module doesn't retry the initial connection attempt.
390
+
391
+
#### Solution
392
+
393
+
Check the EdgeAgent logs for certificate renewal events:
394
+
395
+
```bash
396
+
sudo iotedge logs edgeAgent | grep -i "renewal"
397
+
```
398
+
399
+
To resolve:
400
+
401
+
1. Verify that each custom module has `"restartPolicy": "always"` in the deployment manifest.
402
+
1. Implement connection retry logic in custom modules. Use the Azure IoT device SDK's built-in retry policies, or add exponential backoff retry logic so the module automatically reconnects to EdgeHub after a restart. For more information, see [Manage connectivity and reliable messaging by using Azure IoT Hub device SDKs](../iot-hub/iot-hub-reliability-features-in-sdks.md).
403
+
1. To control when the renewal disruption occurs, set the `threshold` to an absolute time instead of a percentage. For example, `threshold = "10d"` triggers renewal 10 days before certificate expiry. For more information, see [Plan for Edge CA renewal](how-to-manage-device-certificates.md#plan-for-edge-ca-renewal).
404
+
381
405
### IoT Edge Hub reports System.FormatException error when using AMQP protocol
0 commit comments