Cannot install and configure iotedge runtime (Windows 10)

Oleg 1 Reputation point
2021-07-13T15:06:15.323+00:00

Hi,
I have a problem with installation iot edge runtime on Windows 10.
On the computer was installed older releases of Windows Admin Center,
I tried to install IoT Edge runtime (with older IoT Edge exptension) but got error (unfortunately I didn't keep this message) during installation.
Then I found that MS release new release of Windows Admin Center, so I uninstalled not working edge runtime from Windows Admin Center, and updated Windows Admin Center to last version (also I updated all installed extensions).

Now I can install edge runtime but on the last stage "Connect" (I specified manual method with connection string) I got error "Error: Aborting, iotedge was previously provisioned (headless mode)!" . When I open Edge runtime from Windows Admin Center I see in the log:

* iotedge.service - Azure IoT Edge daemon
Loaded: loaded (/lib/systemd/system/iotedge.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2021-07-13 13:35:17 UTC; 1h 27min ago
Docs: man:iotedged(8)
Process: 1369 ExecStart=/usr/bin/iotedged -c /etc/iotedge/config.yaml (code=exited, status=153)
Main PID: 1369 (code=exited, status=153)
[object Object]
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:17Z [ERR!] - caused by: Edge device information is required.
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: Please update config.yaml with the IoT Hub connection information.
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: See https://aka.ms/iot-edge-configure-linux for more details.
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:16Z [INFO] (/usr/src/mariner/BUILD/azure-iotedge-1.1.3/edgelet/hsm-sys/azure-iot-hsm-c/src/hsm_log.c:log_init:41) Initialized logging
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:16Z [INFO] (/usr/src/mariner/BUILD/azure-iotedge-1.1.3/edgelet/hsm-sys/azure-iot-hsm-c/src/edge_hsm_client_store.c:generate_edge_hsm_certificates_if_needed:1629) Load status 1. Regenerating owner and device CA certs and keys
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:16Z [INFO] (/usr/src/mariner/BUILD/azure-iotedge-1.1.3/edgelet/hsm-sys/azure-iot-hsm-c/src/edge_pki_openssl.c:generate_rsa_key:346) Generating RSA key of length 4096
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:17Z [ERR!] (/usr/src/mariner/BUILD/azure-iotedge-1.1.3/edgelet/hsm-sys/azure-iot-hsm-c/src/hsm_utils.c:read_file_into_buffer_impl:167) Could not open file for reading /var/lib/iotedge/hsm/enc_keys/edgelet-masterWt5mT2xpO72EPKlt2Tt0Sq4uJCrMvfl2rzzKRB3pnyo_.enc.key. Errno 2 'No such file or directory'
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW iotedged[1369]: 2021-07-13T13:35:17Z [INFO] (/usr/src/mariner/BUILD/azure-iotedge-1.1.3/edgelet/hsm-sys/azure-iot-hsm-c/src/edge_hsm_client_store.c:load_encryption_key_from_file:817) Could not read encryption key from file. No key file exists or is invalid or permission error.
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW systemd[1]: iotedge.service: Main process exited, code=exited, status=153/n/a
Jul 13 13:35:17 DESKTOP-M67M3GR-EFLOW systemd[1]: iotedge.service: Failed with result 'exit-code'.

I tried to provision edge device with Powershell script Provision-EflowVm but without success - it runs forever (wait for about 2 hours and then terminated it)

Can you suggest how to reinstall Edge Runtime from the scratch?

Thanks,
Oleg

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

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 33,746 Reputation points
    2021-07-14T08:19:41.357+00:00

    @Oleg Glad to hear that you are unblocked. I believe you are following this documentation.

    You can use the dashboard extension in Windows Admin Center to uninstall Azure IoT Edge for Linux on Windows and then install again. Below are the steps for uninstalling IoT Edge.

    • Connect to the IoT Edge device in Windows Admin Center. The Azure dashboard tool extension loads.
    • Select Uninstall. After Azure IoT Edge is removed, Windows Admin Center removes the Azure IoT Edge device connection entry from the Start page.

    Another way to remove Azure IoT Edge from your Windows system is to select Start > Settings > Apps > Azure IoT Edge LTS > Uninstall on your IoT Edge device. This method removes Azure IoT Edge from your IoT Edge device, but leaves the connection behind in Windows Admin Center. To complete the removal, uninstall Windows Admin Center from the Settings menu as well.

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

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.