【问题标题】:Failing to setup Azure IoT Edge runtime: Invalid hostname无法设置 Azure IoT Edge 运行时:主机名无效
【发布时间】:2017-12-15 02:46:17
【问题描述】:

我在 Azure 上运行标准 D2s v3(2 vcpus,8 GB 内存),并安装了 Python、Docker 和 iotedgectl。

当我跑步时

iotedgectl setup --connection-string "HostName=***.azure-devices.net;DeviceId=***;SharedAccessKey=***" --auto-cert-gen-force-no-passwords

我收到以下错误

ERROR: Error parsing user input data: Invalid hostname. Hostname cannot be empty or greater than 64 characters: ****.nwq4jyrgm4zejiseat2enywp0h.fx.internal.cloudapp.net.
ERROR: Please fix any input values and re-run 'iotedgectl setup'
ERROR: Errors were observed. Return Code: 1

有什么想法吗?

【问题讨论】:

    标签: azure-iot-edge


    【解决方案1】:

    IoT Edge 运行时需要主机名来为 Edge Hub 生成 TLS 服务器证书。这可以在模块和叶设备之间启用可验证的 TLS 连接(用于网关场景)。根据RFC3280,SSL 证书的公用名的最大长度为 64 个字符。 (搜索 ub-common-name-length)。

    此错误表明主机名超出此限制。默认情况下,iotedgectl 工具会检测并使用主机的主机名。不幸的是,Azure Windows VM 的主机名很长。

    要解决这个问题,您可以设置主机名并绕过自动检测,如下所示:

    iotedgectl setup --connection-string "<conn string>" --auto-cert-gen-force-no-passwords --edge-hostname <a shorter hostname>
    

    如果您有兴趣将 IoT Edge 用作网关,这里有更多信息:https://docs.microsoft.com/en-us/azure/iot-edge/how-to-create-transparent-gateway

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多