Skip to content

Unable to use Relay due to failing healthcheck for non-standard HTTP ports #6057

Description

@Westie

Describe the problem

Relays at times fail to work, due to the healthcheck failing to take into consideration relays that are set up on non-standard ports, such as 80 and 443.

To Reproduce

Create instance of Netbird
Add additional relay of rel://test-domain-2:45678
Note that in logs that relay rel://test-domain-2:45678 has been added
Note that in logs that relay rel://test-domain-2/relay has been queried, instead of rel://test-domain:45678/relay

Issue can be located here: https://github.com/netbirdio/netbird/blame/c4b2da4c92520d006af448d90c6f533352b10769/relay/healthcheck/ws.go#L21

...and was originally introduced here: #4905

I unfortunately am not competent with Go, therefore do not wish to commit a PR to a project such as Netbird at this time.

2026-05-03T20:25:40.865+01:00 INFO shared/relay/client/manager.go:217: update relay server URLs: [rel://test-domain-1:12345 rel://test-domain-2:45678]
2026-05-03T20:27:09.774+01:00 ERRO shared/relay/client/dialer/ws/ws.go:48: failed to dial to Relay server 'ws://test-domain-2': failed to WebSocket dial: failed to send handshake request: Get "http://test-domain-2/relay": context deadline exceeded
2026-05-03T20:27:09.774+01:00 ERRO [relay: rel://test-domain-2] shared/relay/client/dialer/race_dialer.go:79: failed to dial via WS: failed to WebSocket dial: failed to send handshake request: Get "http://test-domain-2/relay": context deadline exceeded

Expected behavior

I would expect that the port would be respected when performing the healthcheck.

Are you using NetBird Cloud?

Self hosted

NetBird version

Latest/master

Is any other VPN software installed?

If yes, which one?

Debug output

N/A

Screenshots

N/A

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions