EDGAR managed setup netbird may have issues with connecting
While setting up a new peer with opendut-edgar setup managed <SETUP STRING> it may get stuck in state netbird connect. To resolve this issue it was enough to stop the netbird service with sudo systemctl stop netbird.service.
This seems to be not a proper solution, because it requires a manual step and we should handle this in a different automated way.
❌ NetBird - Connect
Error while executing:
Error during NetBird-Login: Request error: status: DeadlineExceeded, message: "context deadline exceeded", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }: status: DeadlineExceeded, message: "context deadline exceeded", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
Mai 02 10:45:23 [HOST] opendut-edgar[106669]: 2024-05-02T08:45:23.684317Z DEBUG opendut_netbird_client_api::client: Connecting to NetBird Client...
Mai 02 10:45:23 [HOST] opendut-edgar[106669]: 2024-05-02T08:45:23.684485Z INFO opendut_netbird_client_api::client: Connected to NetBird Client.
Mai 02 10:45:23 [HOST] opendut-edgar[106669]: Error: Local IP parse error: Local IP returned by NetBird '' could not be parsed: invalid IPv4 address syntax
Mai 02 10:45:23 [HOST] systemd[1]: opendut-edgar.service: Main process exited, code=exited, status=1/FAILURE
Mai 02 10:45:23 [HOST] systemd[1]: opendut-edgar.service: Failed with result 'exit-code'.
~~Also the logs seem to be wrong, since it states that Netbird connection was opend up successfully which was not the case.~~
AC:
- analyze why this happens and
- suggest, document and / or implement a solution which handle this kind of error
- make logs more speakable ~~and correct the statement when it obviously was not connected successful.~~
I've adjusted the logging to now say:
Connected to NetBird Client process via Unix domain socket at '/var/run/netbird.sock'.
(The logging was not supposed to say that it's connected to the NetBird Server, but rather to the NetBird Client.)
We haven't observed this in some time. We now always restart NetBird during the EDGAR Setup, and we've also upgraded NetBird to a newer version, which may have fixed this.
This happens when there is an error in the netbird client when it is longer able to authenticate with the netbird management server. I was able to provoke this error by deploying a new backend (restored another backup that did not know/include this netbird client).