plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[Netbird] Not able to connect to selfhosted management backend

Open josch700 opened this issue 1 year ago • 13 comments

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

  • [x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
  • [x] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
  • [x] The title contains the plugin to which this issue belongs

Describe the bug Setting the Management URL, the Setup Key and clicking on Connect does nothing. Not even an error is shown and no log file is created. It shows a checkmark on the "Connect" button though

To Reproduce Steps to reproduce the behavior:

  1. Put in the management URL in the appropriate field
  2. Put in the setup key in the appropriate field
  3. Click on Connect
  4. Nothing happens

Expected behavior It should connect and show up in the "Peers" view in the Netbird management panel

Additional context I tried it with and without the "Enabled" setting in the settings tab. Both didn't work. Also when using the CLI tool to connect it works. If I took a guess, it has to do with the admin URL. The GUI clients seem to extrapolate it from the management URL, in the CLI tools Netbird want's you to set it manually. Don't know if the plugin extrapolates that as well

Environment OPNsense 26.1.a_75 (amd64) Type opnsense-devel

josch700 avatar Jul 31 '25 10:07 josch700

CC @bcmmbaga

fichtner avatar Jul 31 '25 10:07 fichtner

Hi @josch700, it appears that the service is either not installed or not running. Could you please check using the command netbird status -d? Was this the first installation or had you been running the client normally without the GUI before?

bcmmbaga avatar Jul 31 '25 11:07 bcmmbaga

Hi @josch700, it appears that the service is either not installed or not running. Could you please check using the command netbird status -d? Was this the first installation or had you been running the client normally without the GUI before?

Oh yeah @bcmmbaga you are right, sorry. The socket isn't open. I did run the client but only after the old version of the GUI had some issues with the setup key as well. Guess my cleanup didn't remove everything. It's only a testing instance so I can just reset it completely, or would you like to look into it anyway?

josch700 avatar Jul 31 '25 11:07 josch700

You can either reset it or just run netbird service uninstall, remove the package, and then install the GUI. The GUI will handle the rest, including installing the client and should be good to go

bcmmbaga avatar Jul 31 '25 12:07 bcmmbaga

Ok I now even have completely reinstalled opnsense, so no setting up netbird manually or anything. Still doesn't work. The socket is not up, In the WebGUI the buttons on the top right look like this: Image Clicking on start doesn't change anything and the "Connect" button still does nothing. So I guess the daemon can't start without any config and the Authentication tab can't handle the first time setup in my case?

josch700 avatar Jul 31 '25 14:07 josch700

Yes without the daemon, you cannot connect at all. You can install it manually using netbird service install

bcmmbaga avatar Jul 31 '25 15:07 bcmmbaga

Ok but shouldn't that be done by the installation process? Also the Init does already exist

josch700 avatar Jul 31 '25 15:07 josch700

I just gave it a go to install the Netbird plugin on my Opnsense. I'm having similar issues with the daemon not starting when enabling it in the Netbird settings. When saving the settings I can see the following in the General Log:

netbird: failed to decode configuration: Syntax error

Not sure where I can find the configuration file though

pellz0r avatar Jul 31 '25 18:07 pellz0r

Same behavior as described

The previous version worked fine. After upgrading to the current version, it is no longer possible to start the service or connect to my own Netbird Server.

ABlueCasket avatar Jul 31 '25 18:07 ABlueCasket

I managed to start the daemon with netbird service start and then I could connect to the server. Not sure if the configuration is working correct though as the above mentioned syntax error.

pellz0r avatar Jul 31 '25 18:07 pellz0r

I managed to start the daemon with netbird service start and then I could connect to the server. Not sure if the configuration is working correct though as the above mentioned syntax error.

The configuration error occurred because the daemon was not started, and the default configuration file for the client is not created unless the daemon is running

bcmmbaga avatar Jul 31 '25 18:07 bcmmbaga

Could you share the client version? I'm working on reproducing the issue and preparing a fix

bcmmbaga avatar Jul 31 '25 18:07 bcmmbaga

Do you mean the Netbird client version? Or the plugin in Opnsense?

Running Opnsense 25.7.1 with the package netbird 0.49.0_1 and os-netbird-devel 0.2 The status for Netbird shows 0.49.0 for both Daemon and CLI version

pellz0r avatar Jul 31 '25 19:07 pellz0r