[GH-ISSUE #1963] Barrier server: Failed to get local IP address. Please manually type in server address on your clients. #1435

Open
opened 2026-05-05 07:50:35 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @samodadela on GitHub (Aug 8, 2023).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1963

What happened?

The message above appears when barrier (server) is started right after boot.

image

If barrier is quit and started again, the message does not appear. This happens if barrier is started from XFCEs "Session and Startup" (passwordless login)

image

Log:

[2023-08-08T19:35:31] INFO: SSL fingerprint generated.

[2023-08-08T19:35:31] INFO: starting server
[2023-08-08T19:35:31] INFO: config file: /tmp/Barrier.efnfyo
[2023-08-08T19:35:31] INFO: log level: INFO
started server (IPv4/IPv6), waiting for clients
[2023-08-08T19:35:31] INFO: OpenSSL 3.1.1 30 May 2023
[2023-08-08T19:35:31] INFO: accepted secure socket
[2023-08-08T19:35:31] INFO: TLS_AES_256_GCM_SHA384         TLSv1.3 Kx=any      Au=any   Enc=AESGCM(256)            Mac=AEAD
[2023-08-08T19:35:31] NOTE: accepted client connection
[2023-08-08T19:35:31] NOTE: client "axxx" has connected

After startup:
image

It seems that barrier works after confirming the dialog, but it would be better is this error would be just logged instead of opening the dialog.

A workaround is to create a script that sleeps for a few seconds and then call /usr/bin/barrier.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

From a Manjaro package:

image

What OSes are you seeing the problem on? (Check all that apply)

Linux

What OS versions are you using?

Linux cxxx 6.1.41-1-MANJARO #1 SMP PREEMPT_DYNAMIC Tue Jul 25 09:17:30 UTC 2023 x86_64 GNU/Linux

Relevant log output

No response

Any other information

No response

Originally created by @samodadela on GitHub (Aug 8, 2023). Original GitHub issue: https://github.com/debauchee/barrier/issues/1963 ### What happened? The message above appears when barrier (server) is started right after boot. ![image](https://github.com/debauchee/barrier/assets/16334222/b9921215-538b-4431-921a-a421199a891e) If barrier is quit and started again, the message does not appear. This happens if barrier is started from XFCEs "Session and Startup" (passwordless login) ![image](https://github.com/debauchee/barrier/assets/16334222/13088d8d-8e63-44b6-a4f7-d022e2ea67ce) Log: ``` [2023-08-08T19:35:31] INFO: SSL fingerprint generated. [2023-08-08T19:35:31] INFO: starting server [2023-08-08T19:35:31] INFO: config file: /tmp/Barrier.efnfyo [2023-08-08T19:35:31] INFO: log level: INFO started server (IPv4/IPv6), waiting for clients [2023-08-08T19:35:31] INFO: OpenSSL 3.1.1 30 May 2023 [2023-08-08T19:35:31] INFO: accepted secure socket [2023-08-08T19:35:31] INFO: TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD [2023-08-08T19:35:31] NOTE: accepted client connection [2023-08-08T19:35:31] NOTE: client "axxx" has connected ``` After startup: ![image](https://github.com/debauchee/barrier/assets/16334222/8b57e08c-0e0b-4ef8-b026-ad536f0876db) It seems that barrier works after confirming the dialog, but it would be better is this error would be just logged instead of opening the dialog. A workaround is to create a script that sleeps for a few seconds and then call /usr/bin/barrier. ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? From a Manjaro package: ![image](https://github.com/debauchee/barrier/assets/16334222/c6a1735d-4340-44b6-9775-fb714796b515) ### What OSes are you seeing the problem on? (Check all that apply) Linux ### What OS versions are you using? Linux cxxx 6.1.41-1-MANJARO #1 SMP PREEMPT_DYNAMIC Tue Jul 25 09:17:30 UTC 2023 x86_64 GNU/Linux ### Relevant log output _No response_ ### Any other information _No response_
Author
Owner

@steelman commented on GitHub (Jul 23, 2024):

One of possibilities is that your IP address is not on the list of preferred and is not returned by ZeroconfService::getLocalIPAddresses().

EDIT#1: As a result Berrier does not register the server in with DNS-SD.

<!-- gh-comment-id:2245079130 --> @steelman commented on GitHub (Jul 23, 2024): One of possibilities is that your IP address is not on the list of [preferred](https://github.com/debauchee/barrier/blob/653e4badeb88f61de901581667d4465d7b1e2d52/src/gui/src/ZeroconfService.cpp#L37) and is not returned by [ZeroconfService::getLocalIPAddresses()](https://github.com/debauchee/barrier/blob/653e4badeb88f61de901581667d4465d7b1e2d52/src/gui/src/ZeroconfService.cpp#L127). EDIT#1: As a result Berrier [does not register](https://github.com/debauchee/barrier/blob/653e4badeb88f61de901581667d4465d7b1e2d52/src/gui/src/ZeroconfService.cpp#L170) the server in with DNS-SD.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1435
No description provided.