microsoft / vscode-azure-iot-tools

The ultimate collection of extensions for working with Azure IoT in VS Code!
https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-tools
MIT License
20 stars 19 forks source link

C2D Monitoring is blocking for MQTT devices #39

Open thorpebt opened 3 years ago

thorpebt commented 3 years ago

Using the tool "Start Receiving C2D Messages" now takes over the active session for that DeviceID and forces an error 400027-connectionforcefullyclosedonnewconnection on the device with an existing MQTT session. This means that I can no longer monitor bidirectional messaging in real time.

I have been able to replicate on multiple devices and on freshly created DeviceIDs.

Logs on the IoT Hub indicate a second IP (aside from my remote device) attempting to establish a session repeatedly. It is from the IP block 173.230.231.0/24.

dbomsta-ngrf commented 2 years ago

My issue seems related, but maybe not.

Installed Azure IoT Tools v0.3.0 today. Hoping to use it to monitor and such. Once I logged in and start using the tools, my client had the connection reset by peer. This caused issued with WolfSSL and/or FreeRTOS and the product would ASSERT (stuck).

I looked into and modified the FreeRTOS tasks stack and heap...nothing I did had any effect. Then it dawned on my I had the Azure IoT Tools running and monitoring C2D messages. Upon disabling Azure IoT Tools, my client no longer has issues,