Client trying to connect to unavailable relay server #2284

Open
opened 2025-11-20 07:07:03 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @ad35cm on GitHub (Sep 15, 2025).

Describe the problem

When a NetBird client needs to connect to a peer through a relay, it sometimes tries to use a relay server that is unavailable for client, even when other relays are online.

This relay selection logic does not check if the chosen relay server is actually online and available for both peers, there are no failover to other relay.

To Reproduce

Not 100% reliable way to reproduce due to relay selection logic

  1. Add two netbird relay servers to management config, relay A and relay B
  2. Create two peers, peer A and peer B
  3. Make peer B exit node
  4. Make relay B unavailable for peer A
  5. In netbird status -d output get "Relay server address: relay A" for peer A and "Relay server address: relay B" for peer B
  6. Peer A in netbird status -d correctly display two relays, with relay B unavailable
  7. Peer A tries to connect to peer B via unavailable relay B and cannot

Expected behavior

The client should check if a relay server is available before trying to connect through it. If the preferred relay is offline, it should try another available relay.

Are you using NetBird Cloud?

self-host NetBird's control plane.

NetBird version

0.57

Is any other VPN software installed?

No

Originally created by @ad35cm on GitHub (Sep 15, 2025). **Describe the problem** When a NetBird client needs to connect to a peer through a relay, it sometimes tries to use a relay server that is unavailable for client, even when other relays are online. This relay selection logic does not check if the chosen relay server is actually online and available for both peers, there are no failover to other relay. **To Reproduce** Not 100% reliable way to reproduce due to relay selection logic 1. Add two netbird relay servers to management config, relay A and relay B 2. Create two peers, peer A and peer B 3. Make peer B exit node 4. Make relay B unavailable for peer A 5. In `netbird status -d` output get "Relay server address: relay A" for peer A and "Relay server address: relay B" for peer B 6. Peer A in `netbird status -d` correctly display two relays, with relay B unavailable 7. Peer A tries to connect to peer B via unavailable relay B and cannot **Expected behavior** The client should check if a relay server is available before trying to connect through it. If the preferred relay is offline, it should try another available relay. **Are you using NetBird Cloud?** self-host NetBird's control plane. **NetBird version** 0.57 **Is any other VPN software installed?** No
saavagebueno added the triage-needed label 2025-11-20 07:07:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2284