microsoft / vscode-azure-iot-edge

Azure IoT Edge for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-edge
Other
51 stars 36 forks source link

[Java module]Unable to establish MQTT connection #250

Closed czgtest closed 6 years ago

czgtest commented 6 years ago

OS: windows10 Linux container Pi arm32v3 * edge runtime

pre-step: 1.install Azure IoT Edge 1.4.0-rc1 2.java template 1.1.0

step: 1.create java module solution 2.build and run IoT Edge runtime in simulator

verify error : Unable to establish MQTT connection

image

adashen commented 6 years ago

@czgtest why it is PI arm32 egde runtime but is windows10 container? Besides, there are errors one start javamodule first time in solution. Since at that time edge hub is not ready. It will be restarted again. And the next connection should be successfully. Please check again and give more information.

czgtest commented 6 years ago

this issue will occur in both scenarios:
windows10 Linux container simulator Pi arm32v7 edge runtime.

I see docker logs of java module , as you said, these errors will repro on start javamodule first time in solution. then the connection will be pass and send D2C message , I was confused at the time why this error always appeared in the log. so I open an issue here.

adashen commented 6 years ago

The reason is java module started before edgeHub is ready. So there is connection issue. It dependents on the starting up sequence of the edgeHub.

czgtest commented 6 years ago

this issue is not repro on now, so close it