Multi-user collision: livekit-server binds on every global IPv6, EADDRINUSE on sibling user's mycelium bridge #31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Multi-user Hero boxes provision a per-user mycelium IPv6 /64 bridge (e.g.
br-samehat4a0:6976:8fa7:efc:5::1,br-ashrafat4a0:6976:8fa7:efc:1::1). Each user runs their ownlivekit-serverconfigured withnode_ip = <their bridge IP>, expecting traffic to be scoped to that interface.Bug
livekit-server uses Pion's UDP port-mux for the RTC port (default 7882). When
rtc.ips.includesis unset, Pion auto-enumerates every global IPv6 address on the host and tries to bind UDP/7882 on each. Result: the second user to start hitsEADDRINUSEon a sibling user's bridge IP, even though that IP isn't theirs.Observed on dev box:
That IP is
br-ashraf, but the message comes from sameh'slivekit-serverattempting to bind it via Pion auto-enumeration.The collision is amplified by stale bridge addresses lingering after a user is removed (separate
multi_user_delcleanup gap), but the root cause is the unrestricted Pion enumeration.Fix
Render
rtc.ips.includes: ["<node_ip>/128"]into the generatedlivekit.yamlso the SFU pins UDP binding (and ICE candidate advertisement) to its configurednode_iponly.Per livekit upstream, this is the documented restriction mechanism:
Verification
Patch tested on dev box
138.201.206.39. Both users'livekit-serverinstances now bind only on their own bridge IP and run concurrently. PR: #TBD.4a0:6976:8fa7:efc:1::1on br-timur and br-ashraf — needs root-cause analysis #164