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

时间:2020-04-15 10:53:49

标签: azure azure-iot-edge

我正在跑步:

  • 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,并将其作为步骤3中的设备注册到IoT中心中。
  5. (不确定是否需要),使用命令docker run -d -p 5000:5000 --restart=always --name registry registry:2在docker中启动注册表。
  6. 使用默认设置(包括存储库URL(localhost:5000 / moduleName))在Visual Studio中创建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

1 个答案:

答案 0 :(得分:0)

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