gpt4 book ai didi

linux - 根据 config.yaml 文件的新版本,Iotedge 在 Linux 环境中处于非事件状态

转载 作者:太空宇宙 更新时间:2023-11-04 11:51:05 27 4
gpt4 key购买 nike

https://github.com/Azure/iotedge/commit/72c11d32f99ae7cb34b3ef41f9346c6249e3ed21 根据这个新发布的版本,我尝试了 DPS TPM 供应配置和 DPS 对称 key 供应配置,但是在提供所需的配置时,它不起作用

Running "journalctl -u iotedge --no-pager --no-full" gives error:

May 09 14:02:07 mohit2816 iotedged[21270]: 2019-05-09T08:32:07Z [INFO] - Using config file: /etc/iotedge/config.yaml
May 09 14:02:07 mohit2816 iotedged[21270]: 2019-05-09T08:32:07Z [ERR!] - The daemon could not start up successfully: Could not load settings
May 09 14:02:07 mohit2816 iotedged[21270]: 2019-05-09T08:32:07Z [ERR!] - caused by: Could not load settings
May 09 14:02:07 mohit2816 iotedged[21270]: 2019-05-09T08:32:07Z [ERR!] - caused by: did not find expected <document start> at line 89 column 6 in etc/iotedge/config.yaml


This the config.yaml file part at line 89:

agent:
name: "edgeAgent"
type: "docker"
env: {}
config:
image: "mcr.microsoft.com/azureiotedge-agent:1.0"
auth: {}

Configuration is as follows:
#Manual provisioning configuration
# provisioning:
# source: "manual"
# device_connection_string: "{add connection string}"

```
# DPS TPM provisioning configuration
provisioning:
source: "dps"
global_endpoint: "https://global.azure-devices-provisioning.net"
scope_id: "{DPS_scopeId}"
attestation:
method: "tpm"
registration_id: "{regId}"

# DPS symmetric key provisioning configuration
# provisioning:
# source: "dps"
# global_endpoint: "https://global.azure-devices-provisioning.net"
# scope_id: "{scopeId}"
# attestation:
# method: "symmetric_key"
# registration_id: "{regId}"
# symmetric_key: "{symmetric key}"


Expected output:
● iotedge.service - Azure IoT Edge daemon
Loaded: loaded (/lib/systemd/system/iotedge.service; enabled; vendor preset:
Active: active (running) since Thu 2019-05-09 11:15:23 IST; 8s ago
Docs: man:iotedged(8)
Main PID: 12540 (iotedged)
Tasks: 15
Memory: 10.4M
CPU: 53ms
CGroup: /system.slice/iotedge.service
└─12540 /usr/bin/iotedged -c /etc/iotedge/config.yaml


Actual:
iotedge.service - Azure IoT Edge daemon
Loaded: loaded (/lib/systemd/system/iotedge.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2019-05-09 11:57:04 IST; 2s ago
Docs: man:iotedged(8)
Process: 13945 ExecStart=/usr/bin/iotedged -c /etc/iotedge/config.yaml (code=exited, status=1/FAILURE)
Main PID: 13945 (code=exited, status=1/FAILURE)

最佳答案

配置部分缩进了一个空格太多。这应该有效:

provisioning:
source: "dps"
global_endpoint: "https://global.azure-devices-provisioning.net"
scope_id: "{DPS_scopeId}"
attestation:
method: "tpm"
registration_id: "{regId}"

关于linux - 根据 config.yaml 文件的新版本,Iotedge 在 Linux 环境中处于非事件状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56053823/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com