edgeAgent fails to start in Azure IoT Edge for Linux on Windows

Marcin Muskala 0 Reputation points
2024-04-22T12:38:43.79+00:00

Environment:

Windows 11
EflowVm v1.4
edgeAgent v1.4

I'm working on the project utilising Azure IoT Hub, that has multiple devices registered, all of them sharing one deployment config. All of the devices were previously working. Today when I started one of them that hasn't been used for a week an error occurred. Windows machine starts without issue, eflow vm also seems to be working fine. But when looking into installed modules with "iotedge list" I can see that instead of full list of modules there's only one installed - edgeAgent and it fails to start with exit code 127. Tried restarting both edgeAgent and whole Windows machine. I also tried changing deployment config to trigger modules reinstall but it didn't change anything.

iotedge system logs contains only informations about not being able to start edgeHub, however once I've seen some kind of a certificate error as follows:

[ERR!] - !!! caused by: could not load key pair: AZIOT_KEYS_RC_ERR_EXTERNAL**

I was not able to capture it again

result of iotedge check:

root [ /home/iotedge-user ]# iotedge check --verbose

Configuration checks (aziot-identity-service)
---------------------------------------------
√ keyd configuration is well-formed - OK
√ certd configuration is well-formed - OK
√ tpmd configuration is well-formed - OK
√ identityd configuration is well-formed - OK
√ daemon configurations up-to-date with config.toml - OK
√ identityd config toml file specifies a valid hostname - OK
√ aziot-identity-service package is up-to-date - OK
√ host time is close to reference time - OK
√ preloaded certificates are valid - OK
√ keyd is running - OK
√ certd is running - OK
√ identityd is running - OK
√ read all preloaded certificates from the Certificates Service - OK
√ read all preloaded key pairs from the Keys Service - OK
√ check all EST server URLs utilize HTTPS - OK
√ ensure all preloaded certificates match preloaded private keys with the same ID - OK

Connectivity checks (aziot-identity-service)
--------------------------------------------
√ host can connect to and perform TLS handshake with iothub AMQP port - OK
√ host can connect to and perform TLS handshake with iothub HTTPS / WebSockets port - OK
√ host can connect to and perform TLS handshake with iothub MQTT port - OK

Configuration checks
--------------------
√ aziot-edged configuration is well-formed - OK
√ configuration up-to-date with config.toml - OK
√ container engine is installed and functional - OK
× configuration has correct URIs for daemon mgmt endpoint - Error
    Error loading shared library libstdc++.so.6: Exec format error (needed by /usr/bin/dotnet)
    Error loading shared library libgcc_s.so.1: Exec format error (needed by /usr/bin/dotnet)
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt5ctypeIcE13_M_widen_initEv: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc: symbol not found
    Error relocating /usr/bin/dotnet: _ZdlPv: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt8ios_baseD2Ev: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev: symbol not found
    Error relocating /usr/bin/dotnet: __cxa_end_catch: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcmm: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt20__throw_out_of_rangePKc: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEmm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt16__throw_bad_castv: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm: symbol not found
    Error relocating /usr/bin/dotnet: __cxa_begin_catch: symbol not found
    Error relocating /usr/bin/dotnet: __cxa_rethrow: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt6localeD1Ev: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt20__throw_system_errori: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt8ios_base4InitC1Ev: symbol not found
    Error relocating /usr/bin/dotnet: _Znwm: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt24__throw_out_of_range_fmtPKcz: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt24__throw_invalid_argumentPKc: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt20__throw_length_errorPKc: symbol not found
    Error relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_: symbol not found
    Error relocating /usr/bin/dotnet: _ZNSolsEi: symbol not found
    Error relocating /usr/bin/dotnet: _Unwind_Resume: symbol not found
    Error relocating /usr/bin/dotnet: _ZSt9terminatev: symbol not found
    Error relocating /usr/bin/dotnet: 
[... removed rest to fit in characters limit here]
‼ DNS server - Warning
    Container engine is not configured with DNS server setting, which may impact connectivity to IoT Hub.
    Please see https://aka.ms/iotedge-prod-checklist-dns for best practices.
    You can ignore this warning if you are setting DNS server per module in the Edge deployment.
        caused by: Container engine is not configured with DNS server setting, which may impact connectivity to IoT Hub.
                   Please see https://aka.ms/iotedge-prod-checklist-dns for best practices.
                   You can ignore this warning if you are setting DNS server per module in the Edge deployment.
‼ production readiness: logs policy - Warning
    Container engine is not configured to rotate module logs which may cause it run out of disk space.
    Please see https://aka.ms/iotedge-prod-checklist-logs for best practices.
    You can ignore this warning if you are setting log policy per module in the Edge deployment.
        caused by: Container engine is not configured to rotate module logs which may cause it run out of disk space.
                   Please see https://aka.ms/iotedge-prod-checklist-logs for best practices.
                   You can ignore this warning if you are setting log policy per module in the Edge deployment.
‼ production readiness: Edge Agent's storage directory is persisted on the host filesystem - Warning
    The edgeAgent module is not configured to persist its /tmp/edgeAgent directory on the host filesystem.
    Data might be lost if the module is deleted or updated.
    Please see https://aka.ms/iotedge-storage-host for best practices.
        caused by: The edgeAgent module is not configured to persist its /tmp/edgeAgent directory on the host filesystem.
                   Data might be lost if the module is deleted or updated.
                   Please see https://aka.ms/iotedge-storage-host for best practices.
× production readiness: Edge Hub's storage directory is persisted on the host filesystem - Error
    Could not check current state of edgeHub container
        caused by: Could not check current state of edgeHub container
        caused by: docker returned exit status: 1, stderr = Error: No such object: edgeHub
√ Agent image is valid and can be pulled from upstream - OK
√ proxy settings are consistent in aziot-edged, aziot-identityd, moby daemon and config.toml - OK

Connectivity checks
-------------------
× container on the default network can connect to upstream AMQP port - Error
    Container on the default network could not connect to ihtnsmiqcdev01.azure-devices.net:5671
        caused by: Container on the default network could not connect to ihtnsmiqcdev01.azure-devices.net:5671
      [same stacktrace as previous]
× container on the IoT Edge module network can connect to upstream HTTPS / WebSockets port - Error
    Container on the azure-iot-edge network could not connect to ihtnsmiqcdev01.azure-devices.net:443
        caused by: Container on the azure-iot-edge network could not connect to ihtnsmiqcdev01.azure-devices.net:443
        
[same stacktrace as previous]
√ container on the IoT Edge module network can connect to upstream MQTT port - OK
    skipping because of not required in this configuration
25 check(s) succeeded.
3 check(s) raised warnings.
7 check(s) raised errors.
2 check(s) were skipped due to errors from other checks. 

edgeAgent log contains these messages, multiple times, as it's being restarted over and over:

2024-04-16 08:48:11  Starting Edge Agent2024-04-16 08:48:11  Changing ownership of storage folder: /tmp/edgeAgent to 136222024-04-16 08:48:11  Changing ownership of backup folder: /tmp/edgeAgent_backup to 136222024-04-16 08:48:11  Changing ownership of management socket: /var/run/iotedge/mgmt.sock2024-04-16 08:48:11  Completed necessary setup. Starting Edge Agent.Error loading shared library libstdc++.so.6: Exec format error (needed by /usr/bin/dotnet)Error loading shared library libgcc_s.so.1: Exec format error (needed by /usr/bin/dotnet)Error relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt5ctypeIcE13_M_widen_initEv: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc: symbol not foundError relocating /usr/bin/dotnet: _ZdlPv: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt8ios_baseD2Ev: symbol not foundError relocating /usr/bin/dotnet: _ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev: symbol not foundError relocating /usr/bin/dotnet: __cxa_end_catch: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode: symbol not foundError relocating /usr/bin/dotnet: _ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEPKcmm: symbol not foundError relocating /usr/bin/dotnet: _ZSt20__throw_out_of_rangePKc: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEmm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_: symbol not foundError relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm: symbol not foundError relocating /usr/bin/dotnet: _ZSt16__throw_bad_castv: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm: symbol not foundError relocating /usr/bin/dotnet: __cxa_begin_catch: symbol not foundError relocating /usr/bin/dotnet: __cxa_rethrow: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEPKcmm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt6localeD1Ev: symbol not foundError relocating /usr/bin/dotnet: _ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev: symbol not foundError relocating /usr/bin/dotnet: _ZSt20__throw_system_errori: symbol not foundError relocating /usr/bin/dotnet: _ZNSt8ios_base4InitC1Ev: symbol not foundError relocating /usr/bin/dotnet: _Znwm: symbol not foundError relocating /usr/bin/dotnet: _ZSt24__throw_out_of_range_fmtPKcz: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm: symbol not foundError relocating /usr/bin/dotnet: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not foundError relocating /usr/bin/dotnet: _ZSt24__throw_invalid_argumentPKc: symbol not foundError relocating /usr/bin/dotnet: _ZSt20__throw_length_errorPKc: symbol not foundError relocating /usr/bin/dotnet: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_: symbol not foundError relocating /usr/bin/dotnet: _ZNSolsEi: symbol not foundError relocating /usr/bin/dotnet: _Unwind_Resume: symbol not foundError relocating /usr/bin/dotnet: _ZSt9terminatev: symbol not foundError relocating /usr/bin/dotnet: _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l: symbol not foundError relocating /usr/bin/dotnet: _ZSt19__throw_logic_errorPKc: symbol not foundError relocating /usr/bin/dotnet: _ZNSt8ios_base4InitD1Ev: symbol not foundError relocating /usr/bin/dotnet: _ZTVSt15basic_streambufIcSt11char_traitsIcEE: symbol not foundError relocating /usr/bin/dotnet: _ZTTSt13basic_fstreamIcSt11char_traitsIcEE: symbol not foundError relocating /usr/bin/dotnet: _ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE: symbol not foundError relocating /usr/bin/dotnet: _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE: symbol not foundError relocating /usr/bin/dotnet: __gxx_personality_v0: symbol not found

Please advise, best regards,

Marcin.

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.
541 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,124 questions
0 comments No comments
{count} votes