mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #997] Reconnecting SERVER with CLIENT Error after sleep cycle #797
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#797
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dev-101 on GitHub (Jan 1, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/997
Describe the bug
Hi,
sometimesalways after I wakeup server computer from sleep / standby, the mouse can't enter client's screen. Can't say why it happens, but it happens every single time, now.I have provided 2 logs, Basic and DEBUG2 level (cleaned + added commentary in various sections about certain observations and actions). Reload seems to fix this issue - every time.
To Reproduce
Steps to reproduce the behavior:
Please do not link to image hosting sites, as these can be ephemeral. Instead, attach them to the issue.
Desktop (please complete the following information):
@dev-101 commented on GitHub (Jan 1, 2021):
Basic Log
@dev-101 commented on GitHub (Jan 1, 2021):
Advanced DEBUG2 Level Log
@rebroad commented on GitHub (Feb 16, 2021):
I believe this is the same issue I am experiencing. I hibernated my server, and while it was hibernated the client continues to try to connect to it every 1 second. However, for some reason it stopped attempting to reconnect after approximately 33488 attempts (9 hours, 18 minutes and 8 seconds later), so that when the server came online again, it didn't reconnect. The client logs reveal no explanation as to why the client stopped trying to connect.
On the client side, a manual stop and start will reestablish the connection, but I would prefer it if it didn't stop trying to reconnect as it currently does - and after a seemingly random duration.
@dev-101 commented on GitHub (Feb 16, 2021):
Well, I have reverted back to Synergy for this very reason, it became annoying after few months, have to admit :(
I have disabled continuous checks and tried changing other options, but nothing helped resolve this.
For me they both work the same, except S does not have this issue, despite being a much older release.
@rebroad commented on GitHub (Feb 21, 2021):
I've discovered a possible cause - it seems a process on the server side dies:-
[2021-02-21T05:24:48] NOTE: client "raspberrypi" has connected
[2021-02-21T06:08:20] NOTE: client "raspberrypi" is dead
[2021-02-21T06:08:21] INFO: OpenSSL 1.0.2l 25 May 2017
[2021-02-21T06:08:21] INFO: accepted secure socket
[2021-02-21T06:08:21] INFO: AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD
[2021-02-21T06:08:21] NOTE: accepted client connection
[2021-02-21T06:08:21] NOTE: client "raspberrypi" has connected
[2021-02-21T06:54:44] NOTE: client "raspberrypi" is dead
[2021-02-21T06:54:46] WARNING: detected application not running, pid=17212
[2021-02-21T06:54:47] INFO: backing off, wait=2s, failures=1
[2021-02-21T06:54:49] INFO: starting new process as privileged user
barriers.exe: no configuration available
[2021-02-21T06:54:50] ERROR: failed to launch, error: process immediately stopped
[2021-02-21T06:54:50] INFO: backing off, wait=4s, failures=2
[2021-02-21T06:54:54] INFO: starting new process as privileged user
barriers.exe: no configuration available
[2021-02-21T06:54:55] ERROR: failed to launch, error: process immediately stopped
[2021-02-21T06:54:55] INFO: backing off, wait=6s, failures=3
[2021-02-21T06:55:02] INFO: starting new process as privileged user
barriers.exe: no configuration available
[2021-02-21T06:55:03] ERROR: failed to launch, error: process immediately stopped
@rebroad commented on GitHub (Feb 21, 2021):
Ok, so the fix so far is to simply manually stop and start the server, which produces this output in the logs:-
barriers.exe: no configuration available
[2021-02-21T13:42:12] ERROR: failed to launch, error: process immediately stopped
[2021-02-21T13:42:12] INFO: backing off, wait=10s, failures=593
[2021-02-21T13:42:22] INFO: starting new process as privileged user
barriers.exe: no configuration available
[2021-02-21T13:42:23] INFO: service command updated
[2021-02-21T13:42:23] ERROR: failed to launch, error: process immediately stopped
[2021-02-21T13:42:23] INFO: backing off, wait=2s, failures=1
[2021-02-21T13:42:26] INFO: backing off, wait=2s, failures=1
[2021-02-21T13:42:27] INFO: starting server
[2021-02-21T13:42:27] INFO: config file: C:/Users/rebroad/AppData/Local/Temp/Barrier.oidnWe
[2021-02-21T13:42:27] INFO: log level: INFO
[2021-02-21T13:42:27] INFO: service command updated
[2021-02-21T13:42:28] INFO: starting new process as privileged user
[2021-02-21T13:42:28] ERROR: failed to get desktop path, no drop target available, error=2
[2021-02-21T13:42:28] NOTE: started server (IPv4/IPv6), waiting for clients
[2021-02-21T13:42:28] INFO: server status: active
[2021-02-21T13:42:36] INFO: OpenSSL 1.0.2l 25 May 2017
[2021-02-21T13:42:37] INFO: accepted secure socket
[2021-02-21T13:42:37] INFO: AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD
[2021-02-21T13:42:37] NOTE: accepted client connection
[2021-02-21T13:42:37] NOTE: client "raspberrypi" has connected
It should therefore be possible to fix this by automating what I did manually. Hopefully someone can provide a patch to perform this action automatically soon.
@Celerii commented on GitHub (Apr 19, 2021):
The BetterTouchTool utility has a "after mac wakes from sleep" trigger that can do many actions.
After some tests, I managed to have a working auto-restart solution with this trigger and associating the following actions :
If you do not know BetterTouchTool, you can see it as the equivalent of AutoHotkey for the Mac: a swiss army knife to automate macOS with nearly every input/output possible.
Hope it will help some of you !
@esackbauer commented on GitHub (Jun 2, 2021):
I have the same issue and its really a pain!
I managed to workaround it with a Task Scheduler script, no need for additional tools. Just import it as XML file into Task Scheduler, enter your password to allow it to run with higher privileges or enter user account which can restart services.
It waits for the event that indicates the resume from standby, and then restarts the service via powershell command.
@downsj2 commented on GitHub (Oct 26, 2021):
It'd be great to get an integrated fix for this. It really is very annoying when using Windows as the "server".
FWIW, Synergy has the same problem and hasn't fixed it either.
@Gerbinist commented on GitHub (Nov 28, 2021):
I use Windows as server here too, but I don't see similar behavior with Synergy server v1.8.8. Resume after hibernation works perfectly fine for all clients and they resume connection just fine after v1.8.8 Synergy server 'wakes up'.
This issue that Barrier has is really annoying. Clients just fail to connect when the server wakes up from hibernation. Manually restarting the server is the only method to fix this situation.