[GH-ISSUE #485] failed to connect to server: unknown error, ClentApp.cpp 303 #379

Open
opened 2026-05-05 06:14:05 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @rjonessoar on GitHub (Nov 6, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/485

Operating Systems

Server: Windows 10

Client: Ubuntu

I installed barrier yesterday. Server on Windows 10, installed from pre-built binaries. For the client, I am on an Ubuntu laptop, and I downloaded the .zip file from github and built manually. The "autoconfig" mode on the client did not work (for some reason it seems to be looking for 192.168.56.1? My server is on 192.168.86.166). However, by manually entering the server IP, I was able to get everything working.

After a couple of hours, I accidentally killed the barrier client with control-C. When I restarted, the client now fails to connect. It just keeps repeating the following message in the log:
WARNING: failed to connect to server: unknown error for: 192.168.86.166:24800
/home/cmac/Downloads/barrier-master/src/lib/barrier/ClientApp.cpp, 303

I tried rebooting both machines, but the problem remains.

I tried uninstalling and reinstalling barrier on both machines, but the problem remains.

I used nc to verify that I can connect to 192.168.86.166:24800 successfully, so it doesn't appear to be a firewall issue.

I have no explanation for why the program would have been working and then just got into a non-working state after a ctrl-C. Is there a cache somewhere or something that I need to delete? I suspect there is, because even after I reinstalled, the client "remembered" my host server IP. But where would that file be, and would that be what causes this problem?

Barrier Version

Server: 2.3.2-snapshot-210c2b70
Client: 2.3.2-snapshot-00000000

Does this bug prevent you from using Barrier entirely? Yes

Originally created by @rjonessoar on GitHub (Nov 6, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/485 ### Operating Systems ### Server: Windows 10 Client: Ubuntu I installed barrier yesterday. Server on Windows 10, installed from pre-built binaries. For the client, I am on an Ubuntu laptop, and I downloaded the .zip file from github and built manually. The "autoconfig" mode on the client did not work (for some reason it seems to be looking for 192.168.56.1? My server is on 192.168.86.166). However, by manually entering the server IP, I was able to get everything working. After a couple of hours, I accidentally killed the barrier client with control-C. When I restarted, the client now fails to connect. It just keeps repeating the following message in the log: WARNING: failed to connect to server: unknown error for: 192.168.86.166:24800 /home/cmac/Downloads/barrier-master/src/lib/barrier/ClientApp.cpp, 303 I tried rebooting both machines, but the problem remains. I tried uninstalling and reinstalling barrier on both machines, but the problem remains. I used nc to verify that I can connect to 192.168.86.166:24800 successfully, so it doesn't appear to be a firewall issue. I have no explanation for why the program would have been working and then just got into a non-working state after a ctrl-C. Is there a cache somewhere or something that I need to delete? I suspect there is, because even after I reinstalled, the client "remembered" my host server IP. But where would that file be, and would that be what causes this problem? ### Barrier Version ### Server: 2.3.2-snapshot-210c2b70 Client: 2.3.2-snapshot-00000000 Does this bug prevent you from using Barrier entirely? Yes
gitea-mirror added the
bug
windows
linux
labels 2026-05-05 06:14:05 -06:00
Author
Owner

@rjonessoar commented on GitHub (Nov 7, 2019):

Okay, I finally did find the file ~/.config/Debauchee/Barrier.conf on the Ubuntu client machine. I removed it and restarted barrier, manually typed in the server IP, and things are working again. I did a diff between the old and new versions of the Barrier.conf file. There are a few additions in the old file (the one that doesn't work), but the only line that looks suspicious to me is this one:

configFile=/home/cmac/barrier.conf

That file doesn't exist, so I wonder if that's somehow what was causing the problem.

<!-- gh-comment-id:550557785 --> @rjonessoar commented on GitHub (Nov 7, 2019): Okay, I finally did find the file ~/.config/Debauchee/Barrier.conf on the Ubuntu client machine. I removed it and restarted barrier, manually typed in the server IP, and things are working again. I did a diff between the old and new versions of the Barrier.conf file. There are a few additions in the old file (the one that doesn't work), but the only line that looks suspicious to me is this one: configFile=/home/cmac/barrier.conf That file doesn't exist, so I wonder if that's somehow what was causing the problem.
Author
Owner

@rjonessoar commented on GitHub (Nov 7, 2019):

Here is the Barrier.conf file that wasn't working.
Barrier.conf.bak.txt

<!-- gh-comment-id:550558380 --> @rjonessoar commented on GitHub (Nov 7, 2019): Here is the Barrier.conf file that wasn't working. [Barrier.conf.bak.txt](https://github.com/debauchee/barrier/files/3817267/Barrier.conf.bak.txt)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 1, 2020):

Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem

<!-- gh-comment-id:701709453 --> @github-actions[bot] commented on GitHub (Oct 1, 2020): Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem
Author
Owner

@davidthewatson commented on GitHub (Dec 13, 2020):

I have exactly the same issue, except that the client is mac.

Both client and server machines can ping each other without fail. nc connects client to server on the target port, no problem. But the client just keeps putting out log messages that say:

WARNING: failed to connect to server: unknown error for: 192.168.50.75 :24800

This persists after reboot and reinstall just as the OP reported above on linux.

My linux client continues to work with the barrier server on win 10 pro so I'm sure the server still functional and I don't believe the firewall is involved here.

The root cause is not clear. I've had this 3 machine setup working for months now.

This is not the first time I've seen the mac client fail catastrophically. The other time I had reported mac client failures, the log was different:

https://github.com/debauchee/barrier/issues/261

<!-- gh-comment-id:744045375 --> @davidthewatson commented on GitHub (Dec 13, 2020): I have exactly the same issue, except that the client is mac. Both client and server machines can ping each other without fail. nc connects client to server on the target port, no problem. But the client just keeps putting out log messages that say: ```WARNING: failed to connect to server: unknown error for: 192.168.50.75 :24800``` This persists after reboot and reinstall just as the OP reported above on linux. My linux client continues to work with the barrier server on win 10 pro so I'm sure the server still functional and I don't believe the firewall is involved here. The root cause is not clear. I've had this 3 machine setup working for months now. This is not the first time I've seen the mac client fail catastrophically. The other time I had reported mac client failures, the log was different: https://github.com/debauchee/barrier/issues/261
Author
Owner

@Bluqui commented on GitHub (Mar 17, 2021):

I have the same issue

Server: PopOS
Client: Linux Mint

if i try to connect the Linux Mint with the PopOS, this work
but if i try PopOS with Linux Mint, this dont work

i also did try Ubuntu with Windows

but i did have the same issue

Pc 1: Ubuntu, PopOS
Pc 2: Window, Linux Mint

did connect the Pc 1 with Pc 2 never work

(and i don't speak english)

<!-- gh-comment-id:800874952 --> @Bluqui commented on GitHub (Mar 17, 2021): I have the same issue Server: PopOS Client: Linux Mint if i try to connect the Linux Mint with the PopOS, this work but if i try PopOS with Linux Mint, this dont work i also did try Ubuntu with Windows but i did have the same issue Pc 1: Ubuntu, PopOS Pc 2: Window, Linux Mint did connect the Pc 1 with Pc 2 never work (and i don't speak english)
Author
Owner

@x64nik commented on GitHub (Mar 20, 2021):

sry for late answer,
so i was trying to share my keyboard and mouse from win10 (pc) to kali linux (laptop) on first startup i got a successful connection between 2machines but on 2nd startup i got this same error 'Failed to connect to server : Timed out'. my client ip and host ip was also correct but still i was not getting a connection then i found that the windows firewall is blocking the connection and that the main reason of connection Timed out

SOLUTION :- go to windows firewall and go to windows firewall properties and go in privet profile section and allow Inbound Connection. andddd we are DONE!

<!-- gh-comment-id:803262983 --> @x64nik commented on GitHub (Mar 20, 2021): sry for late answer, so i was trying to share my keyboard and mouse from win10 (pc) to kali linux (laptop) on first startup i got a successful connection between 2machines but on 2nd startup i got this same error 'Failed to connect to server : Timed out'. my client ip and host ip was also correct but still i was not getting a connection then i found that the windows firewall is blocking the connection and that the main reason of connection Timed out SOLUTION :- go to windows firewall and go to windows firewall properties and go in privet profile section and allow Inbound Connection. andddd we are DONE!
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#379
No description provided.