Skip to content

Commit b36117d

Browse files
authored
Migrate nested edge to a new IoTHub
1 parent b06a672 commit b36117d

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

articles/iot-edge/troubleshoot-common-errors.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use this article to resolve common issues encountered when deployin
44
author: kgremban
55

66
ms.author: kgremban
7-
ms.date: 03/01/2021
7+
ms.date: 02/28/2022
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -470,6 +470,27 @@ IoT Edge devices behind a gateway get their module images from the parent IoT Ed
470470
471471
Make sure the parent IoT Edge device can receive incoming requests from the child IoT Edge device. Open network traffic on ports 443 and 6617 for requests coming from the child device.
472472
473+
## IoT Edge behind a gateway cannot connect when migrating from one IoT Hub to another
474+
475+
**Observed behavior:**
476+
477+
When attempting to migrate a hierarchy of Edge devices from one IoT Hub to another, the top level parent Edge device can connect to IoT Hub, but downstream Edge devices cannot. The logs report `Unable to authenticate client downstream-device/$edgeAgent with module credentials`.
478+
479+
**Root cause:**
480+
481+
The credidentials for the downstream devices were not updated properly when the migration to the new IoT Hub happened. Because of this, `edgeAgent` and `edgeHub` modules were set to have authentication type of `none` (default if not set explicitly). During connection, the modules on the downstream devices use old credentials, causing the authentication to fail.
482+
483+
**Resolution:**
484+
485+
When migrating to the new IoT hub (assuming not using DPS), follow these steps in order:
486+
1. Follow [this guide to export and then import device identities](../iot-hub/iot-hub-bulk-identity-mgmt.md) from the old IoT hub to the new one
487+
1. Reconfigure all IoT Edge deployments and Configurations in the new IoT hub
488+
1. Reconfigure all parent-child device relationships in the new IoT hub
489+
1. Update each device to point to the new IoT Hub hostname (`iothub_hostname` under `[provisioning]` in `config.toml`)
490+
1. If you chose to exclude authentication keys during the device export, reconfigure each device with the new keys given by the new IoT hub (`device_id_pk` under `[provisioning.authentication]` in `config.toml`)
491+
1. Restart the top-level parent Edge device first, make sure it's up and running
492+
1. Restart each device in hierarchy level by level from top to the bottom
493+
473494
:::moniker-end
474495
<!-- end 1.2 -->
475496

0 commit comments

Comments
 (0)