[GH-ISSUE #1138] I can't to connect... #913

Open
opened 2026-05-05 07:16:25 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @alessiob07 on GitHub (Apr 20, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1138

Hi!
I tried this program, with my Linux PC, and my Windows 10 PC , and i want use my Linux PC keyboard and mouse
I don't know why is really really slowly to start my Barrier on Linux, and in the Log i receive: WARNING: cannot listen for clients: cannot bind address: Address already in use

If i try to change my ip-address form the Barrier settings i receive: 2021-04-20T14:08:06] FATAL: failed to start server: cannot bind address: Cannot assign requested address
[2021-04-20T14:08:06] ERROR: process exited with error code: 1
[2021-04-20T14:08:06] INFO: detected process not running, auto restarting

How i can solve? Tranks! (If my english isn't perfect is because i'm Italian)

Originally created by @alessiob07 on GitHub (Apr 20, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1138 Hi! I tried this program, with my Linux PC, and my Windows 10 PC , and i want use my Linux PC keyboard and mouse I don't know why is really really slowly to start my Barrier on Linux, and in the Log i receive: WARNING: cannot listen for clients: cannot bind address: Address already in use If i try to change my ip-address form the Barrier settings i receive: 2021-04-20T14:08:06] FATAL: failed to start server: cannot bind address: Cannot assign requested address [2021-04-20T14:08:06] ERROR: process exited with error code: 1 [2021-04-20T14:08:06] INFO: detected process not running, auto restarting How i can solve? Tranks! (If my english isn't perfect is because i'm Italian)
Author
Owner

@mmiszczyk commented on GitHub (Apr 20, 2021):

Cause of this problem is probably that the port is already in use. You can change the port on which Barrier is listening,but the real question is why exactly is this port taken, as it's not a common one. Maybe you have Synergy or a different version of Barrier running? Try using this command: netstat -lntp | grep 24800.

<!-- gh-comment-id:823235415 --> @mmiszczyk commented on GitHub (Apr 20, 2021): Cause of this problem is probably that the port is already in use. You can change the port on which Barrier is listening,but the real question is why exactly is this port taken, as it's not a common one. Maybe you have Synergy or a different version of Barrier running? Try using this command: ```netstat -lntp | grep 24800```.
Author
Owner

@alessiob07 commented on GitHub (Apr 20, 2021):

tcp6 0 0 :::24800 :::* LISTEN 10670/barriers

<!-- gh-comment-id:823242324 --> @alessiob07 commented on GitHub (Apr 20, 2021): tcp6 0 0 :::24800 :::* LISTEN 10670/barriers
Author
Owner

@alessiob07 commented on GitHub (Apr 20, 2021):

I have never try this program or Synergy. I remember that in my first attemp it's work, but don't connect in my Windows PC, i restarted all two pc and i receive the error

<!-- gh-comment-id:823244847 --> @alessiob07 commented on GitHub (Apr 20, 2021): I have never try this program or Synergy. I remember that in my first attemp it's work, but don't connect in my Windows PC, i restarted all two pc and i receive the error
Author
Owner

@alessiob07 commented on GitHub (Apr 20, 2021):

Can be is because i use 2.3.2-snapshot-210cb70 in Windows? and the 2.3.2-snapshot-000000 in Linux?

<!-- gh-comment-id:823249416 --> @alessiob07 commented on GitHub (Apr 20, 2021): Can be is because i use 2.3.2-snapshot-210cb70 in Windows? and the 2.3.2-snapshot-000000 in Linux?
Author
Owner

@alessiob07 commented on GitHub (Apr 20, 2021):

Now in Linux i receive: [2021-04-20T14:49:23] INFO: starting server
[2021-04-20T14:49:23] INFO: config file: /tmp/Barrier.MycjNb
[2021-04-20T14:49:23] INFO: log level: INFO
[2021-04-20T14:49:23] WARNING: failed to register hotkey ScrollLock (id=ef14 mask=0000)
[2021-04-20T14:49:23] NOTE: started server (IPv4), waiting for clients

<!-- gh-comment-id:823252646 --> @alessiob07 commented on GitHub (Apr 20, 2021): Now in Linux i receive: [2021-04-20T14:49:23] INFO: starting server [2021-04-20T14:49:23] INFO: config file: /tmp/Barrier.MycjNb [2021-04-20T14:49:23] INFO: log level: INFO [2021-04-20T14:49:23] WARNING: failed to register hotkey ScrollLock (id=ef14 mask=0000) [2021-04-20T14:49:23] NOTE: started server (IPv4), waiting for clients
Author
Owner

@alessiob07 commented on GitHub (Apr 20, 2021):

and in WIndows: Note: Connecting to '192.168.178.102'
Info: OpenSSL 1.0.21 25 May 2017
Failed to connect: Timed Out

<!-- gh-comment-id:823253530 --> @alessiob07 commented on GitHub (Apr 20, 2021): and in WIndows: Note: Connecting to '192.168.178.102' Info: OpenSSL 1.0.21 25 May 2017 Failed to connect: Timed Out
Author
Owner

@danieltomasz commented on GitHub (May 5, 2021):

for someone in future who will have the same problem and will get running headless barriers

tcp6 0 0 :::24800 :::* LISTEN 10670/barriers

pidof barriers and kill the process with given pid

<!-- gh-comment-id:833093572 --> @danieltomasz commented on GitHub (May 5, 2021): for someone in future who will have the same problem and will get running headless `barriers` > tcp6 0 0 :::24800 :::* LISTEN 10670/barriers `pidof barriers` and `kill` the process with given pid
Author
Owner

@karlwilbur commented on GitHub (May 26, 2021):

When changing your IP address, it can get out of sync with the local Barrier settings config (.config/Debauchee/Barrier.conf on Ubuntu; this is not the same as the config file that is used to set your machine layout, ~/.barrier.conf for me). You can edit the Barrier.conf file and change the interface=#.#.#.# value to match your new IP address.

In the GUI, you can access this settings screen at Barrier -> Change Settings or by pressing F4. On that screen, you change the "Address" value (these settings values are what is stored in .config/Debauchee/Barrier.conf).

This is what I need to change when I modified my network to use a new class C network address. Once I updated that file, my server started up again.

I also needed to configure my clients to use the new IP address for the server. I was able to SSH into the clients and update the same file (.config/Debauchee/Barrier.conf; serverHostname=#.#.#.# value), but needed to get to the connected keyboard and mouse to restart the Barrier client.

<!-- gh-comment-id:849052447 --> @karlwilbur commented on GitHub (May 26, 2021): When changing your IP address, it can get out of sync with the local Barrier settings config (`.config/Debauchee/Barrier.conf` on Ubuntu; this is not the same as the config file that is used to set your machine layout, `~/.barrier.conf` for me). You can edit the `Barrier.conf` file and change the ```interface=#.#.#.#``` value to match your new IP address. In the GUI, you can access this settings screen at `Barrier -> Change Settings` or by pressing <kbd>F4</kbd>. On that screen, you change the "Address" value (these settings values are what is stored in `.config/Debauchee/Barrier.conf`). This is what I need to change when I modified my network to use a new class C network address. Once I updated that file, my server started up again. I also needed to configure my clients to use the new IP address for the server. I was able to SSH into the clients and update the same file (`.config/Debauchee/Barrier.conf`; `serverHostname=#.#.#.#` value), but needed to get to the connected keyboard and mouse to restart the Barrier client.
Author
Owner

@sevegee-tech commented on GitHub (Jul 9, 2021):

setup:
Laptop 1 - Linux Mint 20.1
Laptop 2 - Linux Mint 20.1
Barrier installed (sudo apt install barrier); UFW - off

none of the answers above seem to address the problem - server-side log "ERROR: cannot listen for clients: cannot bind address: Address already in use"

Which address is already in use? Where is the conflict - how to resolve it?

thx

<!-- gh-comment-id:876998815 --> @sevegee-tech commented on GitHub (Jul 9, 2021): setup: Laptop 1 - Linux Mint 20.1 Laptop 2 - Linux Mint 20.1 Barrier installed (sudo apt install barrier); UFW - off none of the answers above seem to address the problem - server-side log "ERROR: cannot listen for clients: cannot bind address: Address already in use" Which address is already in use? Where is the conflict - how to resolve it? thx
Author
Owner

@karlwilbur commented on GitHub (Jul 9, 2021):

@sevegee-tech, "Address already in use" means the port and IP address combination, not just the IP address. This will occur if you are configured to use the same port as another already-running application ....usually Barrier. This most commonly occurs when Barrier is already running and you try to start another instance.

Use you favorite method of searching through running processes (I like ps -eF | grep barrier) and kill all existing Barrier processes, then try starting Barrier.

This is essentially the same solution provided by @danieltomasz above.

<!-- gh-comment-id:877185783 --> @karlwilbur commented on GitHub (Jul 9, 2021): @sevegee-tech, "Address already in use" means the port and IP address combination, not just the IP address. This will occur if you are configured to use the same port as another already-running application ....usually Barrier. This most commonly occurs when Barrier is already running and you try to start another instance. Use you favorite method of searching through running processes (I like `ps -eF | grep barrier`) and kill all existing Barrier processes, then try starting Barrier. This is essentially the same solution provided by @danieltomasz above.
Author
Owner

@sevegee-tech commented on GitHub (Jul 9, 2021):

Thanks Karl... not sure where I'm going wrong here...
TOP; pidof barrier; killall -15 barrier... all return 'no running process'
but
ps -eF | grep barrier does list a process, just the one
kill pid returns ... 'no process'

reboot; now the server's waiting for clients; client-side times out, unable to connect.

confirmed the server-side config is using the correct client name
both laptops are on the same subnet and are visible to each other; ufw is off (both laptops)

<!-- gh-comment-id:877224732 --> @sevegee-tech commented on GitHub (Jul 9, 2021): Thanks Karl... not sure where I'm going wrong here... TOP; pidof barrier; killall -15 barrier... all return 'no running process' but ps -eF | grep barrier does list a process, just the one kill pid returns ... 'no process' reboot; now the server's waiting for clients; client-side times out, unable to connect. confirmed the server-side config is using the correct client name both laptops are on the same subnet and are visible to each other; ufw is off (both laptops)
Author
Owner

@danieltomasz commented on GitHub (Jul 9, 2021):

@sevegee-tech maybe check the ports as described here https://github.com/debauchee/barrier/issues/190#issuecomment-444169720, here https://github.com/debauchee/barrier/issues/597, and here https://itsfoss.community/t/cannot-get-barrier-to-work/5012/34

also to check if the port isn't in use (as if the problem with address in use will come back)

sudo netstat -tlpn | grep ':24800'
<!-- gh-comment-id:877244629 --> @danieltomasz commented on GitHub (Jul 9, 2021): @sevegee-tech maybe check the ports as described here https://github.com/debauchee/barrier/issues/190#issuecomment-444169720, here https://github.com/debauchee/barrier/issues/597, and here https://itsfoss.community/t/cannot-get-barrier-to-work/5012/34 also to check if the port isn't in use (as if the problem with address in use will come back) ``` sudo netstat -tlpn | grep ':24800' ```
Author
Owner

@sevegee-tech commented on GitHub (Jul 9, 2021):

netstat... server-side
tcp 0 0 192.168.178.54:24800 0.0.0.0:* LISTEN 15131/barriers
ping to client returns 6ms

Client-side... barrier connecting to server at 192.168.178.54 - timed out
ping 192.168.178.54 returns 6ms to that ip
nc -vz 192.168.178.54 24800 times out

So, I think that all confirms there's a client-side issue or, am I jumping the gun?

<!-- gh-comment-id:877266737 --> @sevegee-tech commented on GitHub (Jul 9, 2021): netstat... server-side tcp 0 0 192.168.178.54:24800 0.0.0.0:* LISTEN 15131/barriers ping to client returns 6ms Client-side... barrier connecting to server at 192.168.178.54 - timed out ping 192.168.178.54 returns 6ms to that ip nc -vz 192.168.178.54 24800 times out So, I think that all confirms there's a client-side issue or, am I jumping the gun?
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#913
No description provided.