Barrier: Cannot use snap on Ubuntu - permission denied errors for both client and server

Created on 8 May 2019  ·  18Comments  ·  Source: debauchee/barrier

Operating Systems

Server: Mac OS Mojave 10.14.4

Client: Ubuntu 19.04

Barrier Version

Client: 2.2.0-snapshot-56218468
Server: 2.1.0-RELEASE-8b69f9fe

Steps to reproduce bug

  1. Start Barrier server on Mac
  2. Put server IP in on Ubuntu client.
  3. Click Start
  4. See message repeated in logs on Ubuntu client:
[2019-05-09T00:20:02] INFO: starting client
[2019-05-09T00:20:02] INFO: command: /snap/barrier-kvm/2/bin/barrierc -f --no-tray --debug DEBUG --name garrypottr [192.168.2.1]:24800
[2019-05-09T00:20:02] INFO: config file: /tmp/Barrier.n16178
[2019-05-09T00:20:02] INFO: log level: DEBUG
[2019-05-09T00:20:02] DEBUG: XOpenDisplay(":0")
[2019-05-09T00:20:02] DEBUG: xscreensaver window: 0x00000000
[2019-05-09T00:20:02] DEBUG: screen shape: 0,0 1920x1080 
[2019-05-09T00:20:02] DEBUG: window is 0x03000004
[2019-05-09T00:20:02] DEBUG: adopting new buffer
[2019-05-09T00:20:02] DEBUG: opened display
[2019-05-09T00:20:02] NOTE: started client
[2019-05-09T00:20:02] NOTE: connecting to '192.168.2.1': 192.168.2.1:24800
[2019-05-09T00:20:02] DEBUG: event queue is ready
[2019-05-09T00:20:02] DEBUG: add pending events to buffer
[2019-05-09T00:20:02] DEBUG: retry in 1 seconds
[2019-05-09T00:20:02] WARNING: failed to connect to server: cannot create socket: Permission denied
[2019-05-09T00:20:03] NOTE: connecting to '192.168.2.1': 192.168.2.1:24800
[2019-05-09T00:20:03] DEBUG: retry in 1 seconds
[2019-05-09T00:20:03] WARNING: failed to connect to server: cannot create socket: Permission denied
[2019-05-09T00:20:04] NOTE: connecting to '192.168.2.1': 192.168.2.1:24800
[2019-05-09T00:20:04] DEBUG: retry in 1 seconds
[2019-05-09T00:20:04] WARNING: failed to connect to server: cannot create socket: Permission denied
[2019-05-09T00:20:05] NOTE: connecting to '192.168.2.1': 192.168.2.1:24800
[2019-05-09T00:20:05] DEBUG: retry in 1 seconds
  1. Switch Ubuntu to server.
  2. Message appears: Unable to start the zeroconf: Permission denied.
  3. See IP addresses: Unknown in the panel.
  4. Click Start.
  5. See message repeated in logs:
[2019-05-09T00:21:23] INFO: starting server
[2019-05-09T00:21:23] INFO: command: /snap/barrier-kvm/2/bin/barriers -f --no-tray --debug DEBUG --name garrypottr -c /tmp/Barrier.q16178 --address [192.168.2.1]:24800
[2019-05-09T00:21:23] INFO: config file: /tmp/Barrier.e16178
[2019-05-09T00:21:23] INFO: log level: DEBUG
[2019-05-09T00:21:23] DEBUG: opening configuration "/tmp/Barrier.q16178"
[2019-05-09T00:21:23] DEBUG: configuration read successfully
[2019-05-09T00:21:23] DEBUG: XOpenDisplay(":0")
[2019-05-09T00:21:23] DEBUG: xscreensaver window: 0x00000000
[2019-05-09T00:21:23] DEBUG: screen shape: 0,0 1920x1080 
[2019-05-09T00:21:23] DEBUG: window is 0x03000004
[2019-05-09T00:21:23] DEBUG: adopting new buffer
[2019-05-09T00:21:23] DEBUG: opened display
[2019-05-09T00:21:23] ERROR: process exited with error code: 11
[2019-05-09T00:21:23] INFO: detected process not running, auto restarting
[2019-05-09T00:21:24] DEBUG: starting process

All 18 comments

Do you know if there's a way to report a bug against the snap? I personally don't know who maintains it.

There doesn't seem to be an obvious one. I posted in the Snapcraft Forum about it:

https://forum.snapcraft.io/t/how-do-i-log-a-bug-against-a-specific-snap/11282

  • Solution ::
    >> Snap install using a Devmode @jwulf
# *** Warning! ***
# *** Below snap install drops all Security Confinements! ***
# ** USE AT YOUR OWN RISK! ** 
# ===========================

sudo snap install --devmode barrier-kvm 

Try Barrier Beta Snap -- as it uses a different build options::

sudo snap install barrier-kvm --beta 

Third option :: Build your own Snap!

To build a snap might be also pain in the a$$... Same issues as with Flatpak and/or building from source ;) If you use Ubuntu 18.10 or above -- Barrier gets installed from repo - via snap

I can't speak for snap, but building the flatpak is rather trivial.

I found who maintain the snap apparently: https://launchpad.net/~netmag

@AdrianKoshka -- netmag is me ... And i am getting errors with flatpak (first - install flatpak, second - it doesn't see any screen , third - it is still pushing me into KDE .. )

Are you using the flatpak on Wayland? We don't have Wayland support.

nope - X (xfce4 , gnome) , Xvnc and also tested with Xming tunneled via SSH -- didn't have luck // that's why I have built the snap finally as source was also no way for me

third - it is still pushing me into KDE

The runtime it uses is the KDE runtime, because it has the various QT dependencies we need to build.

nope - X (xfce4 , gnome) , Xvnc and also tested with Xming tunneled via SSH

Huh, odd.

I build it from source and I am getting these errors. Synergy v1.8.8 no problems... Fix?

The Stop button isn't even working.

[2019-07-23T15:08:25] INFO: starting server
[2019-07-23T15:08:25] INFO: config file: /tmp/Barrier.X32491
[2019-07-23T15:08:25] INFO: log level: INFO
[2019-07-23T15:08:25] ERROR: process exited with error code: 11
[2019-07-23T15:08:25] INFO: detected process not running, auto restarting

[2019-07-23T15:08:26] INFO: starting server
[2019-07-23T15:08:26] INFO: config file: /tmp/Barrier.L32491
[2019-07-23T15:08:26] INFO: log level: INFO
[2019-07-23T15:08:26] ERROR: process exited with error code: 11
[2019-07-23T15:08:26] INFO: detected process not running, auto restarting

[2019-07-23T15:08:27] INFO: starting server
[2019-07-23T15:08:27] INFO: config file: /tmp/Barrier.n32491
[2019-07-23T15:08:27] INFO: log level: INFO
[2019-07-23T15:08:27] ERROR: process exited with error code: 11
[2019-07-23T15:08:27] INFO: detected process not running, auto restarting

[2019-07-23T15:08:28] INFO: starting server
[2019-07-23T15:08:28] INFO: config file: /tmp/Barrier.k32491
[2019-07-23T15:08:28] INFO: log level: INFO
[2019-07-23T15:08:28] ERROR: process exited with error code: 11
[2019-07-23T15:08:28] INFO: detected process not running, auto restarting

[2019-07-23T15:08:29] INFO: starting server
[2019-07-23T15:08:29] INFO: config file: /tmp/Barrier.U32491
[2019-07-23T15:08:29] INFO: log level: INFO
[2019-07-23T15:08:29] ERROR: process exited with error code: 11
[2019-07-23T15:08:29] INFO: detected process not running, auto restarting

@LamaRaz are you on latest master? I've just built the snap locally from scratch on a clean lxd on Ubuntu 19.04, installed it and ran the server with no issues.
(Note: it needs an unrelated fix in the version-script for local lxd builds, PR coming soon.)

$ cd /tmp/
$ git clone [email protected]:debauchee/barrier.git
$ cd barrier/
$ sed -i "s|git -C parts/barrier/src/|git|" snap/snapcraft.yaml  # Fix version-string
$ snapcraft --use-lxd
Using 'snap/snapcraft.yaml': Project assets will be searched for from the 'snap' directory.
The LXD provider is offered as a technology preview for early adopters.
The command line interface, container names or lifecycle handling may change in upcoming releases.
Launching a container.
...
Priming barrier 
Priming fix-icon 
Common ID None specified in app 'barrierc' is not used in any metadata file.
Common ID None specified in app 'barriers' is not used in any metadata file.
Determining the version from the project repo (version-script).
The version has been set to '2.3.0-10-gf23a2ece'
Snapping 'barrier-kvm' /                                                                                                                                                                           
Snapped barrier-kvm_2.3.0-10-gf23a2ece_amd64.snap            

$ sudo snap install barrier-kvm_2.3.0-10-gf23a2ece_amd64.snap --dangerous
barrier-kvm 2.3.0-10-gf23a2ece installed

$ barrier-kvm.barrier
*** WARNING *** The program 'barrier' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
("-f", "--no-tray", "--debug", "INFO", "--name", "YYY", "--enable-crypto", "-c", "/tmp/Barrier.wZ6777", "--address", ":24800")

And logs show:

[2019-07-23T17:03:09] INFO: starting server
[2019-07-23T17:03:09] INFO: config file: /tmp/Barrier.XM7602
[2019-07-23T17:03:09] INFO: log level: INFO
[2019-07-23T17:03:09] NOTE: started server (IPv4/IPv6), waiting for clients
[2019-07-23T17:03:10] INFO: OpenSSL 1.1.1  11 Sep 2018
[2019-07-23T17:03:10] INFO: accepted secure socket
[2019-07-23T17:03:10] INFO: TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
[2019-07-23T17:03:10] NOTE: accepted client connection
[2019-07-23T17:03:10] NOTE: client "XXX" has connected
[2019-07-23T17:03:11] INFO: switch from "YYY" to "XXX" at 0,607
[2019-07-23T17:03:11] INFO: leaving screen
[2019-07-23T17:03:11] INFO: screen "YYY" updated clipboard 0
[2019-07-23T17:03:12] INFO: screen "YYY" updated clipboard 1
[2019-07-23T17:03:12] INFO: switch from "XXX" to "YYY" at 3831,557
[2019-07-23T17:03:12] INFO: entering screen

You can also try the barrier-maxiberta snap, which is automatically built and published to the edge channel (for details see #360 ).

I tried master and 2.2.0 (also called v2.1.2 for whatever reason) and the barrier-kvm snap. All error code 11 as server on ubuntu 18.04.

Your snap is unfortunately also not working.

[2019-07-23T18:42:03] INFO: starting server
[2019-07-23T18:42:03] INFO: command: /snap/barrier-maxiberta/31/usr/bin/barriers -f --no-tray --debug DEBUG --name gffh1pc --enable-crypto -c /tmp/Barrier.I30874 --address :24800
[2019-07-23T18:42:03] INFO: config file: /tmp/Barrier.s30874
[2019-07-23T18:42:03] INFO: log level: DEBUG
[2019-07-23T18:42:03] DEBUG: opening configuration "/tmp/Barrier.I30874"
[2019-07-23T18:42:03] DEBUG: configuration read successfully
[2019-07-23T18:42:03] DEBUG: XOpenDisplay(":0")
[2019-07-23T18:42:03] DEBUG: xscreensaver window: 0x00000000
[2019-07-23T18:42:03] DEBUG: screen shape: 0,0 3840x1200 (xinerama)
[2019-07-23T18:42:03] DEBUG: window is 0x05a00004
[2019-07-23T18:42:03] DEBUG: adopting new buffer
[2019-07-23T18:42:03] DEBUG: opened display
[2019-07-23T18:42:03] ERROR: process exited with error code: 11
[2019-07-23T18:42:03] INFO: detected process not running, auto restarting
[2019-07-23T18:42:04] DEBUG: starting process

@LamaRaz Can you please:

  • Check OS and snapd versions:
    $ snap version
  • Check confinement denial logs (e.g. look for AppArmor messages in Ubuntu):
    $ journalctl -f
  • Temporarily install the snap with no confinement (only if you trust the snap! :-):
    $ sudo snap install barrier --devmode
  • Run barriers directly from command line:
    $ /snap/bin/barrier-maxiberta.barriers -f --no-tray --debug DEBUG --name server --enable-crypto -c /tmp/Barrier.J30537 --address :24800.
  • Temporarily run barriers with no encryption from command line:
    $ /snap/bin/barrier-maxiberta.barriers -f --no-tray --debug DEBUG --name server -c /tmp/Barrier.J30537 --address :24800.

Thanks!

I have been running both snaps with --devmode otherwise they don't even show IPs.

Also forget the snaps, the native version seg faults...

/usr/local/bin/barriers -f --no-tray --debug DEBUG --name homepc001 -c /tmp/Barrier.Sm4732 --address :24800
[2019-07-24T16:11:22] DEBUG: opening configuration "/tmp/Barrier.Sm4732"
/home/x/000git/barrier-2.1.2/src/lib/barrier/ServerApp.cpp,221
[2019-07-24T16:11:22] DEBUG: configuration read successfully
/home/x/000git/barrier-2.1.2/src/lib/barrier/ServerApp.cpp,232
[2019-07-24T16:11:22] DEBUG: XOpenDisplay(":0")
/home/x/000git/barrier-2.1.2/src/lib/platform/XWindowsScreen.cpp,915
[2019-07-24T16:11:22] DEBUG: xscreensaver window: 0x00000000
/home/x/000git/barrier-2.1.2/src/lib/platform/XWindowsScreenSaver.cpp,346
[2019-07-24T16:11:22] DEBUG: screen shape: 0,0 3840x1200 (xinerama)
/home/x/000git/barrier-2.1.2/src/lib/platform/XWindowsScreen.cpp,152
[2019-07-24T16:11:22] DEBUG: window is 0x05000004
/home/x/000git/barrier-2.1.2/src/lib/platform/XWindowsScreen.cpp,153
[2019-07-24T16:11:22] DEBUG: adopting new buffer
/home/x/000git/barrier-2.1.2/src/lib/base/EventQueue.cpp,181
[2019-07-24T16:11:22] DEBUG: opened display
/home/x/000git/barrier-2.1.2/src/lib/barrier/Screen.cpp,49
Segmentation fault

kernel: barriers[5278]: segfault at 1e121 ip 000000000001e121 sp 00007ffcfe8816b8 error 14 in barriers[55bbd70dd000+152000]

@LamaRaz

  1. Have you tried to run the app with root privileges ( sudo )?
    Might be obvious, but ...
  2. What graphics driver are you using ?
  3. Do you have any monitor connected or is it a full remote server?
  4. Did you try to fully disable the FireWall?
  5. Do you have AppArmor and/or SeLinux enabled?
  6. Might you please post output from
    uname -a
  7. and output of
    env

I was experiencing a minor issues with the Nvidia drivers. Non-standard paths set in $env caused me the headache, and after the LXD itself. If you install in devmode, without sudo the app is not coming up properly.
Let's try to coop with @maxiberta as well. I might test on different architectures. Are you using standard x64 or some IoT board?

@payomagic aka netmag

sudo produces the same seg fault

nvidia 418.56 (for dxvk/vulkan)

2 monitors connected

don't see how a firewall can cause a seg fault but i made no effort to use one and synergy doesn't have any problems connecting

sestatus
SELinux status: disabled

Linux x 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

DISPLAY=:0
GNOME_SHELL_SESSION_MODE=ubuntu
XDG_VTNR=1
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
S_COLORS=auto
XDG_SESSION_ID=1
DESKTOP_SESSION=ubuntu
QT4_IM_MODULE=xim
TEXTDOMAINDIR=/usr/share/locale/
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
QT_ACCESSIBILITY=1
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDG_SESSION_DESKTOP=ubuntu
GJS_DEBUG_OUTPUT=stderr
GTK_MODULES=gail:atk-bridge
WINDOWPATH=1
TERM=xterm-256color
SHELL=/bin/bash
VTE_VERSION=5202
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
IM_CONFIG_PHASE=2
XDG_CURRENT_DESKTOP=ubuntu:GNOME
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GNOME_TERMINAL_SERVICE=:1.70
XDG_SEAT=seat0
SHLVL=1
GDMSESSION=ubuntu
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=x
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
PATH=/home/x/bin:/home/x/anaconda3/bin:/home/x/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
SESSION_MANAGER=local/x:@/tmp/.ICE-unix/1510,unix/x:/tmp/.ICE-unix/1510
LESSOPEN=| /usr/bin/lesspipe %s
GTK_IM_MODULE=ibus
_=/usr/bin/env

Was this page helpful?
0 / 5 - 0 ratings