【问题标题】:edgelet_utils... Get https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64: unauthorized: authentication requirededgelet_utils... 获取 https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64:未授权:需要身份验证
【发布时间】:2018-11-11 20:08:19
【问题描述】:

执行 Install-SecurityDaemon 后,我收到一条非常奇怪的错误消息。 我使用 Visual Studio Code 将 IoT Edge 模块映像部署到 Azure Registry。然后,我尝试在模拟器中执行 IoT Edge 解决方案。一切正常。

我执行了 Install-SecurityDaemon。一切顺利。但是当我执行“iotedge list”命令时,我看到只有两个主要模块到达,但没有我开发的模块 PS C:\WINDOWS\system32> iotedge list NAME STATUS DESCRIPTION CONFIG edgeHub failed Failed (137) an hour ago mcr.microsoft.com/azureiotedge-hub:1.0 edgeAgent running Up 1 second mcr.microsoft.com/azureiotedge-agent:1.0

我看过日志,发现只有一条错误消息:

11.11.2018 22:52:37 warn: edgelet_docker::runtime -- Attempt to pull image failed. 11.11.2018 22:52:42 info: edgelet_core::watchdog -- Checking edge runtime status 11.11.2018 22:52:42 info: edgelet_core::watchdog -- Edge runtime is running. 11.11.2018 22:52:43 warn: edgelet_docker::runtime -- Attempt to pull image failed. 11.11.2018 22:52:43 info: edgelet_http::logging -- [mgmt] - - - [2018-11-11 19:52:43.487711600 UTC] "POST /modules?api-version=2018-06-28 HTTP/1.1" 500 Internal Server Error 141 "-" "-" pid(any) 11.11.2018 22:52:43 warn: edgelet_utils::logging -- Get https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64: unauthorized: authentication required 11.11.2018 22:52:55 info: edgelet_http::logging -- [mgmt] - - - [2018-11-11 19:52:55.502141500 UTC] "POST /modules?api-version=2018-06-28 HTTP/1.1" 500 Internal Server Error 141 "-" "-" pid(any) 11.11.2018 22:52:55 warn: edgelet_utils::logging -- Get https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64: unauthorized: authentication required

然后我执行“docker login”命令以确保 docker 在 Azure 注册表中正确授权。一切都很好。然后,我重新安装 SecurityDaemon。我遇到了同样的错误。

执行命令

PS C:\WINDOWS\system32> docker pull warlibregistry.azurecr.io/iot-edge-engine-simulator:0.0.1-amd64 0.0.1-amd64: Pulling from iot-edge-engine-simulator Digest: sha256:4ba6ae6442ca974b2c52459b85c0861e9664f26990c6e87f20829954f4d67d09

Status: Image is up to date for warlibregistry.azurecr.io/iot-edge-engine-simulator:0.0.1-amd64

不返回错误。但是,如果尝试获取清单 https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64 我真的得到了带有错误“未经授权:需要身份验证”的 JSON。

在添加我的模块 engineSimulator 后,在 Azure 门户中,我看到另一个 iot_edge_engine_simulator 类型为“模块标识”,它不是由我创建的。当我安装例如Microsoft 模块 termoSensor - 没有这样的附加模块。

所以,我被卡住了,我不知道为什么会发生错误以及下一步该怎么做。

感谢您的帮助!

【问题讨论】:

    标签: docker azure-devops azure-iot-hub azure-iot-edge


    【解决方案1】:

    我发现了错误。当我设置模块时,我错过了填写“容器注册表设置”。在使用您自己的容器注册表(不是 Microsoft)的情况下,您必须填写授权参数。

    就我而言: 名称:WarlibRegistry 地址:warlibregistry.azurecr.io 来自容器注册表的“访问密钥”部分的用户名和密码。

    【讨论】:

      猜你喜欢
      • 2018-04-08
      • 2018-10-16
      • 2017-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多