fix(docker): UDP relay for multi-source ESP32 on Docker Desktop Windows#502
Open
fix(docker): UDP relay for multi-source ESP32 on Docker Desktop Windows#502
Conversation
…ws (#374) Docker Desktop on Windows demultiplexes inbound UDP from multiple source IPs onto a single virtual socket, silently dropping packets from all but one ESP32 node. This makes multi-node sensing setups appear to work (WebSocket connects, packets flow on the host) while only one node's CSI ever reaches the container. Adds scripts/udp-relay.py (stdlib only) which collapses multi-source UDP to a single loopback source so Docker's forwarding accepts every packet. Verified locally: 6 packets from 3 distinct source ports all arrive at the receiver from a single relay socket. Updates docker/docker-compose.yml with an inline comment pointing Windows users at the relay + 5006:5005 mapping. Linux/macOS hosts are unaffected and need no changes. Also documents the workaround alongside fixes for #188 (UI 404 from relative --ui-path) and #438 (boot loop on --edge-tier 1/2 against pre-v0.4.3.1 firmware) as new sections 9-11 of docs/TROUBLESHOOTING.md. Supersedes the docs-only PR #413. Closes #374, #386 Refs #188, #438, #301 Co-Authored-By: claude-flow <ruv@ruv.net>
3 tasks
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
scripts/udp-relay.py— a stdlib-only host-side UDP relay that collapses multi-source ESP32 datagrams onto a single loopback source so Docker Desktop on Windows forwards every packet (root cause of Docker Desktop drops UDP from multiple ESP32 sources #374 / Live UI connects, packets flow, but pose does not move correctly with 6 ESP32-S3 nodes on Windows #386).docker/docker-compose.ymlwith an inline comment pointing Windows users at the relay +5006:5005/udpmapping. Linux/macOS hosts are unaffected.docs/TROUBLESHOOTING.md: §9 Docker Desktop Windows UDP (Docker Desktop drops UDP from multiple ESP32 sources #374, Live UI connects, packets flow, but pose does not move correctly with 6 ESP32-S3 nodes on Windows #386), §10 sensing-server/ui404 (Unable to access visualization page via browser #188), §11--edge-tier 1/2boot loop (boot loop #438).Why a relay and not a docs-only fix
Docker Desktop on Windows runs the engine inside a WSL2/Hyper-V VM. Inbound UDP from multiple source IPs is demultiplexed onto a single virtual socket — the first source "wins" and subsequent unique sources are silently dropped at the VM boundary. Neither
host.docker.internalnor--network hostresolves this (host networking is not available on the Linux engine on Windows). The relay is the only end-user-runnable fix until Docker Desktop ships per-source UDP forwarding (docker/for-win#1144).PR #413 by @txhno proposed a docs-only writeup of the same workaround but was conflicting and didn't ship the actual relay tool. This PR supersedes it; happy to credit and close #413 once merged.
Validation
Multi-source relay test on Windows host (this branch):
All 6 packets from 3 distinct source ports arrive at the receiver, all from the relay's single ephemeral socket — exactly the shape Docker Desktop forwards without dropping.
Test plan
docker/docker-compose.ymlto map5006:5005/udp, runpython scripts/udp-relay.py, point ≥2 ESP32-S3 nodes at the host on port 5005, confirm/api/v1/sensing/latestreturns frames from every node.5005:5005/udpmapping still works without the relay.docs/TROUBLESHOOTING.mdlook right on github.com.Closes
Refs
--edge-tier 1/2) — workaround documented; resolved by upgrading to v0.4.3.1-esp32+docs/TROUBLESHOOTING.md@txhno's docs-only attempt) — superseded; can close when this lands🤖 Generated with claude-flow