address already in use for no apparent reason #231

Closed
opened 2025-11-20 05:08:24 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @nazarewk on GitHub (Nov 16, 2022).

I am trying to set up Netbird on NixOS, but i'm getting following errors:

Nov 16 11:26:46 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:46+01:00" level=debug msg="conecting to the Management service api.wiretrustee.com:443" file="connect.go:82"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="connected to the Management service api.wiretrustee.com:443" file="connect.go:87"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="connected to Signal Service: signal2.wiretrustee.com:443" file="grpc.go:78"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=info msg="using kernel WireGuard" file="iface_linux.go:21"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding device: wt0" file="iface_linux.go:57"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding address 100.79.239.233/16 to interface: wt0" file="iface_linux.go:108"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="setting MTU: 1280 interface: wt0" file="iface_linux.go:73"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="bringing up interface: wt0" file="iface_linux.go:80"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="configuring Wireguard interface wt0" file="configuration.go:46"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding Wireguard private key" file="configuration.go:48"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="got Wireguard device wt0" file="configuration.go:35"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=error msg="failed configuring Wireguard interface [wt0]: received error \"address already in use\" while configuring interface wt0 with port 51820" file="engine.go:239"
Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=error msg="error while starting Netbird Connection Engine: received error \"address already in use\" while configuring interface wt0 with port 51820" file="connect.go:149"

Originally created by @nazarewk on GitHub (Nov 16, 2022). I am trying to set up [Netbird on NixOS](https://github.com/nazarewk-iac/nix-configs/commit/9b8e92e5), but i'm getting following errors: ``` Nov 16 11:26:46 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:46+01:00" level=debug msg="conecting to the Management service api.wiretrustee.com:443" file="connect.go:82" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="connected to the Management service api.wiretrustee.com:443" file="connect.go:87" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="connected to Signal Service: signal2.wiretrustee.com:443" file="grpc.go:78" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=info msg="using kernel WireGuard" file="iface_linux.go:21" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding device: wt0" file="iface_linux.go:57" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding address 100.79.239.233/16 to interface: wt0" file="iface_linux.go:108" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="setting MTU: 1280 interface: wt0" file="iface_linux.go:73" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="bringing up interface: wt0" file="iface_linux.go:80" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="configuring Wireguard interface wt0" file="configuration.go:46" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="adding Wireguard private key" file="configuration.go:48" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=debug msg="got Wireguard device wt0" file="configuration.go:35" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=error msg="failed configuring Wireguard interface [wt0]: received error \"address already in use\" while configuring interface wt0 with port 51820" file="engine.go:239" Nov 16 11:26:47 nazarewk-krul netbird[2744208]: time="2022-11-16T11:26:47+01:00" level=error msg="error while starting Netbird Connection Engine: received error \"address already in use\" while configuring interface wt0 with port 51820" file="connect.go:149" ```
Author
Owner

@mlsmaycon commented on GitHub (Nov 16, 2022):

Hello @nazarewk can you check if there is any other application running that is using port 51280, you can do that with:

sudo ss -lnup
# or
sudo netstat -lnup

If that is the case and you can not stop the other process, you can use a custom port by updating the /etc/netbird/config.json and changing the WgPort value.

@mlsmaycon commented on GitHub (Nov 16, 2022): Hello @nazarewk can you check if there is any other application running that is using port 51280, you can do that with: ```shell sudo ss -lnup # or sudo netstat -lnup ``` If that is the case and you can not stop the other process, you can use a custom port by updating the /etc/netbird/config.json and changing the WgPort value.
Author
Owner

@nazarewk commented on GitHub (Nov 16, 2022):

I don't have anything listening on 51280

typo on the port

# ss -lnup | grep 51820
UNCONN 0      0             0.0.0.0:51820      0.0.0.0:*                                               
UNCONN 0      0                [::]:51820         [::]:* 
@nazarewk commented on GitHub (Nov 16, 2022): ~~I don't have anything listening on `51280`~~ typo on the port ``` # ss -lnup | grep 51820 UNCONN 0 0 0.0.0.0:51820 0.0.0.0:* UNCONN 0 0 [::]:51820 [::]:* ```
Author
Owner

@nazarewk commented on GitHub (Nov 16, 2022):

closing this, it's caused by #546 , editing port in config.json helped

@nazarewk commented on GitHub (Nov 16, 2022): closing this, it's caused by #546 , editing port in `config.json` helped
Author
Owner

@mlsmaycon commented on GitHub (Nov 16, 2022):

Thanks, @nazarewk, sorry for the typo. I'm working with it every day, and still not doing this 😄

@mlsmaycon commented on GitHub (Nov 16, 2022): Thanks, @nazarewk, sorry for the typo. I'm working with it every day, and still not doing this 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#231