Fix edgeHub MQTT connection timeouts caused by DotNetty downgrade - #7539
Open
Bilal Sellak (bilalsellak) wants to merge 1 commit into
Open
Fix edgeHub MQTT connection timeouts caused by DotNetty downgrade#7539Bilal Sellak (bilalsellak) wants to merge 1 commit into
Bilal Sellak (bilalsellak) wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an edgeHub MQTT/TLS failure where the client completes TLS and sends MQTT CONNECT, but edgeHub does not receive the decrypted MQTT packet and therefore never returns CONNACK.
Root cause
The .NET 10 and Device SDK update removed a transitive dependency that previously raised DotNetty to 0.7.6. Microsoft.Azure.Devices.ProtocolGateway.Core 2.0.1 still declares 0.6.0, causing NuGet to resolve the MQTT server stack back to DotNetty 0.6.0.
DotNetty 0.6.0 can lose application data received around TLS handshake completion, particularly when the final TLS flight and MQTT CONNECT arrive together with AutoRead=false.
Fix
Validation
A controlled .NET 10 TLS reproduction produced:
DotNetty 0.6.0, TLS + MQTT: 0/30 delivered
DotNetty 0.7.6, same input: 30/30 delivered
Repository validation:
Release build succeeded.
All 192 MQTT unit tests passed.
Generated runtime manifest contains only DotNetty 0.7.6 packages.
No DotNetty 0.6.0 runtime assets remain.
Azure IoT Edge PR checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines and Best Practices
Testing Guidelines
Draft PRs
Draftmode if it is:Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned here for the PR title and description