Lazy connections are inherently unreliable #6666
Unanswered
Spiritreader
asked this question in
Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before posting
Affected area
Client / Agent
Deployment type
Self-hosted - advanced/custom deployment
Operating system or environment
Linux, macOS, Windows, Android, iOS, FreeBSD, OpenWRT, Docker, Kubernetes, Synology, Browser, Other / not sure
NetBird version and upgrade status
Did this work before?
No, this never worked
Regression details
No response
Summary
When lazy connections are enabled, I'm constantly hitting the problem that clients do not connect anymore after some time, especially though after upgrading netbird.
For example if I update netbird on my local machine, I can no longer connect to for example 3-4 nodes. I then have to remote into these nodes via other means and restart them too, because connections will never be re-established. Netbird shows either "Connecting" or "Relayed" on these peers, but there is no active connection, only a connection update, no wireguard handshake
Current behavior
Lazy connections under some conditions will never be re-established.
Expected behavior
Lazy connections allow peers to re-connect if the connection is dropped.
Steps to reproduce
It's a bit hard to reproduce since it's not eniteryl deterministic and doesn't always happen, but
It also happens sometimes when just waking a machine from sleep.
Environment and topology
Peers are on different networks, connected via the internet, in IPv4 and IPv6 P2P and relay connections.
Self-hosted details, if available
Deployment version is via docker compose, legacy split setup
Logs, status output, or debug evidence
Peers detail: suc-docker.netbird.anon: NetBird IP: 100.64.192.207 NetBird IPv6: fd8c:7e8f:50bf:1ab4:ef6c:c130:8062:83ce Public key: anonymized Status: Connecting -- detail -- Connection type: - ICE candidate (Local/Remote): -/- ICE candidate endpoints (Local/Remote): -/- Relay server address: Last connection update: 1 minute, 36 seconds ago Last WireGuard handshake: - Transfer status (received/sent) 0 B/0 B Quantum resistance: false Networks: - Latency: 0sRelated issues or discussions
No response
Impact
Connection between peers does not work when lazy connections are enabled
Additional context
My hunch is that it has something to do with peer activation. I tried to dig around a bit and it appears that there is nothing that actually guarantees that a peer where
foundequals true is actually a peer that does not need to be activated.netbird/client/internal/engine.go
Line 1839 in 3aa6c02
netbird/client/internal/conn_mgr.go
Line 241 in 3aa6c02
But I didn't have the time to compile clients myself and test this.
All reactions