【问题标题】:Debugging Azure IoT Module with iotedgehubdev throws an error使用 iotedgehubdev 调试 Azure IoT 模块会引发错误
【发布时间】:2020-04-15 10:53:49
【问题描述】:

我在跑步:

  • Windows 10 家庭版 1909。
  • Visual Studio 2019 专业版 16.5.0。天蓝色
  • IoT Edge 工具 1.7.0。 azure-iot-sdk-c 包。
  • 最新版本的 Docker Toolbox -(它运行 hello-world 没有错误)。
  • Python,点子。 iotedgehubdev 0.13.0

做了以下步骤:

  1. Azure 上的注册帐户
  2. 创建了免费的 IoT 中心
  3. 注册的边缘设备
  4. (不确定是否需要)创建 VM,安装 Azure Runtime,在 IoT Hub 中将其注册为步骤 3 中的设备。
  5. (不确定是否需要)使用命令docker run -d -p 5000:5000 --restart=always --name registry registry:2 在 docker 中启动注册表
  6. 在 Visual Studio 中使用默认设置创建了 Win 64 Azure 模块项目,包括存储库 URL (localhost:5000/moduleName)
  7. 使用从步骤 3 中获取的设备连接字符串设置 iotedgehubdev。
  8. 将模块的项目设置为启动项目
  9. 尝试开始调试

模块已构建,但调试未开始。

IoT Hub 在 Visual Studio 中的输出:

IoT Hub edge module IotEdgeModule1 is using \"input1\" as inputs
C:\Users\MyUser\Documents\Visual Studio 2019\iotedgehubdev\v0.13.0\iotedgehubdev modulecred -l -m "target"
EdgeHubConnectionString=HostName=MyTestHub.azure-devices.net;GatewayHostName=localhost;DeviceId=myEdgeDevice;ModuleId=target;SharedAccessKey=heres_the_key
EdgeModuleCACertificateFile=C:\ProgramData\iotedgehubdev\data\certs\edge-device-ca\cert\edge-device-ca.cert.pem
DOCKER_HOST: 
DOCKER_TLS_VERIFY: 
DOCKER_CERT_PATH: 
Additional Env Variables: 
C:\Users\MyUser\Documents\Visual Studio 2019\iotedgehubdev\v0.13.0\iotedgehubdev start -i "input1"
IoT Edge Simulator has been started in single module mode.
Please run `iotedgehubdev modulecred` to get credential to connect your module.
And send message through:
        curl --header "Content-Type: application/json" --request POST --data '{"inputName": "input1","data":"hello world"}' http://localhost:53000/api/v1/messages
Please refer to https://github.com/Azure/iot-edge-testing-utility/blob/master/swagger.json for detail schema
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
Starting to check connectivity for local port 8883...
[ERROR]: Failed to connect to local port 8883 in specified time, please try again later.
[ERROR]: Failed to start CLI in specified time.
C:\Users\MyUser\Documents\Visual Studio 2019\iotedgehubdev\v0.13.0\iotedgehubdev stop
IoT Edge Simulator has been stopped successfully.

我尝试禁用 Windows Defender,然后重新启动 - 不走运。 Visual Studio 以管理员权限启动。是否需要任何其他组件?我已经完全关注guide on azure

【问题讨论】:

    标签: azure azure-iot-edge


    【解决方案1】:

    我已将 Windows 重新安装到 10 Pro 而不是 Home,这允许我使用 Docker Desktop 而不是旧的 Docker Toolbox 解决方案。该问题现已修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-20
      • 1970-01-01
      • 2022-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-19
      相关资源
      最近更新 更多