azure - 使用 iotedgehubdev 调试 Azure IoT 模块会引发错误

标签 azure azure-iot-edge

我正在运行:

  • Windows 10 家庭版 1909。
  • Visual Studio 2019 专业版 16.5.0。 azure
  • 物联网边缘工具 1.7.0。 azure-iot-sdk-c 包。
  • 最新版本的 Docker Toolbox -(运行 hello-world 时没有错误)。
  • Python,点子。 iotedgehubdev 0.13.0

执行了以下步骤:

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

模块已构建,但调试未启动。

Visual Studio 中 IoT 中心的输出:

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 .

最佳答案

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

关于azure - 使用 iotedgehubdev 调试 Azure IoT 模块会引发错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61226975/

相关文章:

sql-server - SQL Azure - 连接失败 - 但没有问题?

json - Azure customscriptextension找不到脚本文件

azure - 自定义域未显示在 Azure 函数中

azure - Azure IoT Edge 模块的安装路径

azure - 订阅移动后更新关联的 Azure AD 租户的 key 保管库,而无需同步部署所有依赖的应用程序

ios - iOS8 CloudKit 可以支持幕后流媒体吗?

azure - 边缘模块可以向edgeHub发送多少条消息?

azure - 错误: ENOENT: no such file or directory in visual studio code

用于滚动标记的 Azure IoT Edge 部署策略

Azure IoT Edge - 如何在离线状态下进行本地诊断?