xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Changes between Initial Version and Version 3 of Ticket #2907


Ignore:
Timestamp:
10/18/20 08:58:11 (12 months ago)
Author:
goekce
Comment:

Replying to Antoine Martin:

At the very least: OS, version and command lines. And since this is a permissions / authentication issue - more details about this setup.

I updated the description. How can I help further?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2907

    • Property Status changed from assigned to new
  • Ticket #2907 – Description

    initial v3  
    1 I use Xpra system proxy and login using pam. I get the following error:
     1I use Xpra system proxy and login using pam.
     2
     3- Archlinux, xpra-svn AUR package, xpra v4.1-r27685
     4- Firefox 81.0.2
     5- pam-linux: 1.4.0
     6- I only augmented the systemd file with:
     7
    28{{{
    3 36,289 socket_details: '/run/user/1000/xpra/hostname-0' state does not match (UNKNOWN vs LIVE)
    4 36,389 socket_details(1000, 'LIVE', ':0') sockdir=/run/user/1000/xpra, sockdirs=['/run/user/1000/xpra', '/run/xpra'], testing=['/run/user/1000/xpra', '/run/xpra']
    5 36,814 add_process(<subprocess.Popen object at 0x7f6f09a79be0>, server-:0, xpra start, True, True) pid=134859
    6 36,814 add_dead_process(ProcInfo({'pid': 134859, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen object at 0>
    7 36,815 start_new_session(..) pid=134859, socket_path=/run/user/1000/xpra/hostname-0, display=:0,
    8 36,815 start_new_session('u', '..', 1000, 1000, {}, [])=(<subprocess.Popen object at 0x7f6f09a79be0>, '/run/user/1000/xpra/hostname-0', ':0')
    9 36,815 connect=True, connect_test_request=None
    10 36,815 start_proxy(WebSocket(ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0), {..}, None) using server display at: :0
    11 36,824 display description(:0) = {'display_name': ':0', 'type': 'unix-domain', 'local': True, 'display': ':0', 'socket_dirs': ['/run/user/$UID/xpra', '/run/xpra'], 'uid': 1000, 'gid': 1>
    12 36,825 socket_details(0, 'LIVE', ':0') sockdir=/run/user/1000/xpra, sockdirs=['/run/user/1000/xpra', '/run/xpra'], testing=['/run/user/1000/xpra', '/run/xpra']
    13 36,826 server connection=unix-domain socket:  <- /run/user/1000/xpra/hostname-0
    14 36,827 start_proxy_process()
    15 36,828 sigchld(17, <frame at 0x7f6ef4002ea0, file '/usr/lib/python3.8/site-packages/xpra/platform/displayfd.py', line 62, code read_displayfd>)
    16 36,828 poll() procinfo list: [ProcInfo({'pid': 134859, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen objec>
    17 36,828 reap() calling os.waitpid(-1, 'WNOHANG')
    18 36,828 sigchld(17, <frame at 0x562caaa50c10, file '/usr/lib/python3.8/subprocess.py', line 1886, code _communicate>)
    19 36,828 poll() procinfo list: [ProcInfo({'pid': 134859, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen objec>
    20 36,829 reap() calling os.waitpid(-1, 'WNOHANG')
    21 36,834 start_proxy_process(..) client connection=ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0
    22 36,834 start_proxy_process(..) client state={'max_packet_size': 1048576, 'large_packets': [b'hello', b'window-metadata', b'sound-data', b'notify_show', b'setting-change', b'shell-reply'>
    23 37,095 ProxyInstance({}, [], {'display_name': ':0', 'type': 'unix-domain', 'local': True, 'display': ':0', 'socket_dirs': ['/run/user/$UID/xpra', '/run/xpra'], 'uid': 1000, 'gid': 1000,>
    24 37,095 ProxyProcess(1000, 1000, {}, {}, '/run/xpra', [], ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0, {'display_name': ':0', 'type': 'unix-domain', 'lo>
    25 37,095 starting proxy instance pid 134613 from pid=134613
    26 37,099 ProxyInstanceProcess started
    27 37,099 add_process(<multiprocessing.popen_fork.Popen object at 0x7f6f080e7970>, xpra-proxy-:0, xpra-proxy-instance, True, True) pid=135055
    28 37,100 handover complete: closing connection from proxy server
    29 37,100 sending socket-handover-complete
    30 37,101 started proxy instance pid 135055
    31 37,101  for client ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0
    32 37,101  and server unix-domain socket:  <- /run/user/1000/xpra/hostname-0
    33 37,102 ProxyProcessProcess.run() pid=135055, uid=0, gid=0
    34 37,103 setproctitle not installed: No module named 'setproctitle'
    35 37,104 new uid=1000, gid=1000
    36 37,104 registered signal handler <bound method ProxyInstanceProcess.signal_quit of proxy instance pid 135055>
    37 37,104 waiting for server message on <multiprocessing.queues.Queue object at 0x7f6f081f0610>
    38 37,105 received proxy server message: socket-handover-complete
    39 37,105 setting sockets to blocking mode: (ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0, unix-domain socket:  <- /run/user/1000/xpra/hostname-0)
    40 37,105 set_blocking(ws socket: ::ffff:195.37.232.77, 14500, 0, 0 <- ::ffff:10.1.65.6, 54276, 0, 0)
    41 37,105 calling <socket.socket fd=11, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::ffff:195.37.232.77', 14500, 0, 0), raddr=('::ffff:10.1.65.6', 54276, >
    42 37,106 set_blocking(unix-domain socket:  <- /run/user/1000/xpra/hostname-0)
    43 37,106 calling <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/run/user/1000/xpra/hostname-0>.setblocking(1)
    44 37,106 waiting for server message on <multiprocessing.queues.Queue object at 0x7f6f081f0610>
    45 37,107 DotXpra(/run/xpra, ['/run/xpra'] - 1000:1000 - u).socket_path(:proxy-135055)=/run/xpra/hostname-proxy-135055
    46 37,107 create_control_socket: socket path='/run/xpra/hostname-proxy-135055', uid=1000, gid=1000, state=DEAD
    47 37,107 create_unix_domain_socket failed for '/run/xpra/hostname-proxy-135055'
    48 Traceback (most recent call last):
    49   File "/usr/lib/python3.8/site-packages/xpra/server/proxy/proxy_instance_process.py", line 218, in create_control_socket
    50     sock, self.control_socket_cleanup = create_unix_domain_socket(sockpath, 0o600)
    51   File "/usr/lib/python3.8/site-packages/xpra/net/socket_util.py", line 52, in create_unix_domain_socket
    52     listener.bind(sockpath)
    53 PermissionError: [Errno 13] Permission denied
    54 37,111 Error: failed to setup control socket '/run/xpra/hostname-proxy-135055':
    55 37,111  [Errno 13] Permission denied
     9[Service]
     10Environment=TCP_AUTH=pam
     11Environment=AUTH=pam
     12Environment=DEBUG=auth,proxy,util,x11
    5613}}}
    5714
    58 Do you have an idea why control socket cannot be opened?
     15So the resulting proxy command is:
     16
     17{{{
     18/usr/bin/python /usr/bin/xpra proxy :14500 --daemon=no --tcp-auth=pam --ssl-cert=/etc/xpra/ssl-cert.pem --ssl=on --bind=none --auth=pam --socket-dirs=/run/xpra --socket-permissions=666 --log-dir=/var/log --pidfile t.pem --ssl=on --bind=none --auth=pam --socket-dirs=/run/xpra.pid --debug=auth,proxy,util,x11
     19}}}
     20
     21What I did:
     22
     23- open http://server_ip:14500 on Firefox
     24- server forwards me back to `connect.html`
     25- I use local account credentials and press on Login.
     26
     27  - (if I use `start desktop: xfce4-session`, then the behavior is similar)
     28
     29- server says "websocket connection established"
     30- times out with:
     31
     32    You were disconnected for the following reason:
     33
     34    Did not receive hello before timeout reached, not an Xpra server?
     35
     36
     37Here is journalctl excerpt after successful pam auth.
     38{{{
     39xpra[1738]: 2020-10-18 09:29:12,497 get_server_state: connect(/run/user/1000/xpra/server_hostname-0)=[Errno 111] Connection refused (timeout=5)
     40xpra[1738]: 2020-10-18 09:29:12,497 ECONNREFUSED
     41xpra[1738]: 2020-10-18 09:29:12,498 socket_details: '/run/user/1000/xpra/server_hostname-0' state does not match (UNKNOWN vs LIVE)
     42xpra[1738]: 2020-10-18 09:29:12,598 socket_details(1000, 'LIVE', ':0') sockdir=/run/user/1000/xpra, sockdirs=['/run/user/1000/xpra', '/run/xpra'], testing=['/run/user/1000/xpra', '/run/xpra']
     43xpra[1738]: 2020-10-18 09:29:13,028 add_process(<subprocess.Popen object at 0x7f5d623edb20>, server-:0, xpra start, True, True) pid=1860
     44xpra[1738]: 2020-10-18 09:29:13,029 add_dead_process(ProcInfo({'pid': 1860, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen object at 0x7f>
     45xpra[1738]: 2020-10-18 09:29:13,029 start_new_session(..) pid=1860, socket_path=/run/user/1000/xpra/server_hostname-0, display=:0,
     46xpra[1738]: 2020-10-18 09:29:13,030 start_new_session('u', '..', 1000, 1000, {}, [])=(<subprocess.Popen object at 0x7f5d623edb20>, '/run/user/1000/xpra/server_hostname-0', ':0')
     47xpra[1738]: 2020-10-18 09:29:13,030 connect=True, connect_test_request=None
     48xpra[1738]: 2020-10-18 09:29:13,030 start_proxy(WebSocket(ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0), {..}, None) using server display at: :0
     49xpra[1738]: 2020-10-18 09:29:13,043 display description(:0) = {'display_name': ':0', 'type': 'unix-domain', 'local': True, 'display': ':0', 'socket_dirs': ['/run/user/$UID/xpra', '/run/xpra'], 'uid': 1000, 'gid': 10>
     50xpra[1738]: 2020-10-18 09:29:13,044 socket_details(0, 'LIVE', ':0') sockdir=/run/user/1000/xpra, sockdirs=['/run/user/1000/xpra', '/run/xpra'], testing=['/run/user/1000/xpra', '/run/xpra']
     51xpra[1738]: 2020-10-18 09:29:13,045 server connection=unix-domain socket:  <- /run/user/1000/xpra/server_hostname-0
     52xpra[1738]: 2020-10-18 09:29:13,046 start_proxy_process()
     53xpra[1738]: 2020-10-18 09:29:13,047 sigchld(17, <frame at 0x55fb90f41230, file '/usr/lib/python3.8/site-packages/xpra/platform/displayfd.py', line 62, code read_displayfd>)
     54xpra[1738]: 2020-10-18 09:29:13,047 poll() procinfo list: [ProcInfo({'pid': 1860, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen object a>
     55xpra[1738]: 2020-10-18 09:29:13,047 reap() calling os.waitpid(-1, 'WNOHANG')
     56xpra[1738]: 2020-10-18 09:29:13,047 sigchld(17, <frame at 0x55fb90c27400, file '/usr/lib/python3.8/subprocess.py', line 1867, code _communicate>)
     57xpra[1738]: 2020-10-18 09:29:13,048 poll() procinfo list: [ProcInfo({'pid': 1860, 'name': 'server-:0', 'command': 'xpra start', 'ignore': True, 'forget': True, 'callback': None, 'process': <subprocess.Popen object a>
     58xpra[1738]: 2020-10-18 09:29:13,048 reap() calling os.waitpid(-1, 'WNOHANG')
     59xpra[1738]: 2020-10-18 09:29:13,081 start_proxy_process(..) client connection=ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0
     60xpra[1738]: 2020-10-18 09:29:13,081 start_proxy_process(..) client state={'max_packet_size': 1048576, 'large_packets': [b'hello', b'window-metadata', b'sound-data', b'notify_show', b'setting-change', b'shell-reply',>
     61xpra[1738]: 2020-10-18 09:29:13,503 ProxyInstance({}, [], {'display_name': ':0', 'type': 'unix-domain', 'local': True, 'display': ':0', 'socket_dirs': ['/run/user/$UID/xpra', '/run/xpra'], 'uid': 1000, 'gid': 1000, >
     62xpra[1738]: 2020-10-18 09:29:13,504 ProxyProcess(1000, 1000, {}, {}, '/run/xpra', [], ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0, {'display_name': ':0', 'type': 'unix-domain', 'l>
     63xpra[1738]: 2020-10-18 09:29:13,504 starting proxy instance pid 1738 from pid=1738
     64xpra[1738]: 2020-10-18 09:29:13,509 ProxyInstanceProcess started
     65xpra[1738]: 2020-10-18 09:29:13,509 add_process(<multiprocessing.popen_fork.Popen object at 0x7f5d61af98b0>, xpra-proxy-:0, xpra-proxy-instance, True, True) pid=2017
     66xpra[1738]: 2020-10-18 09:29:13,509 handover complete: closing connection from proxy server
     67xpra[1738]: 2020-10-18 09:29:13,510 sending socket-handover-complete
     68xpra[2017]: 2020-10-18 09:29:13,510 started proxy instance pid 2017
     69xpra[2017]: 2020-10-18 09:29:13,511  for client ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0
     70xpra[2017]: 2020-10-18 09:29:13,511  and server unix-domain socket:  <- /run/user/1000/xpra/server_hostname-0
     71xpra[2017]: 2020-10-18 09:29:13,512 ProxyProcessProcess.run() pid=2017, uid=0, gid=0
     72xpra[2017]: 2020-10-18 09:29:13,513 setproctitle not installed: No module named 'setproctitle'
     73xpra[2017]: 2020-10-18 09:29:13,514 new uid=1000, gid=1000
     74xpra[2017]: 2020-10-18 09:29:13,514 registered signal handler <bound method ProxyInstanceProcess.signal_quit of proxy instance pid 2017>
     75xpra[2017]: 2020-10-18 09:29:13,515 waiting for server message on <multiprocessing.queues.Queue object at 0x7f5d623ff4c0>
     76xpra[2017]: 2020-10-18 09:29:13,516 DotXpra(/run/xpra, ['/run/xpra'] - 1000:1000 - u).socket_path(:proxy-2017)=/run/xpra/server_hostname-proxy-2017
     77xpra[2017]: 2020-10-18 09:29:13,516 received proxy server message: socket-handover-complete
     78xpra[2017]: 2020-10-18 09:29:13,516 setting sockets to blocking mode: (ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0, unix-domain socket:  <- /run/user/1000/xpra/server_hostname-0)
     79xpra[2017]: 2020-10-18 09:29:13,517 set_blocking(ws socket: ::ffff:server_ip, 14500, 0, 0 <- ::ffff:client_ip, 48186, 0, 0)
     80xpra[2017]: 2020-10-18 09:29:13,517 calling <socket.socket fd=11, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, laddr=('::ffff:server_ip', 14500, 0, 0), raddr=('::ffff:client_ip', 48186,>
     81xpra[2017]: 2020-10-18 09:29:13,517 create_control_socket: socket path='/run/xpra/server_hostname-proxy-2017', uid=1000, gid=1000, state=DEAD
     82xpra[2017]: 2020-10-18 09:29:13,517 set_blocking(unix-domain socket:  <- /run/user/1000/xpra/server_hostname-0)
     83xpra[2017]: 2020-10-18 09:29:13,518 create_unix_domain_socket failed for '/run/xpra/server_hostname-proxy-2017'
     84xpra[2017]: Traceback (most recent call last):
     85xpra[2017]:   File "/usr/lib/python3.8/site-packages/xpra/server/proxy/proxy_instance_process.py", line 218, in create_control_socket
     86xpra[2017]:     sock, self.control_socket_cleanup = create_unix_domain_socket(sockpath, 0o600)
     87xpra[2017]:   File "/usr/lib/python3.8/site-packages/xpra/net/socket_util.py", line 52, in create_unix_domain_socket
     88xpra[2017]:     listener.bind(sockpath)
     89xpra[2017]: PermissionError: [Errno 13] Permission denied
     90xpra[2017]: 2020-10-18 09:29:13,518 calling <socket.socket fd=13, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, raddr=/run/user/1000/xpra/server_hostname-0>.setblocking(1)
     91xpra[2017]: 2020-10-18 09:29:13,520 Error: failed to setup control socket '/run/xpra/server_hostname-proxy-2017':
     92xpra[2017]: 2020-10-18 09:29:13,520 waiting for server message on <multiprocessing.queues.Queue object at 0x7f5d623ff4c0>
     93xpra[2017]: 2020-10-18 09:29:13,520  [Errno 13] Permission denied
     94}}}
     95
     96When I look afterwards for running xpra processes, I see as many processes as the number of login trials. An example forked command:
     97{{{
     98/usr/bin/python /usr/bin/xpra start --attach=no --env=XPRA_PROXY_START_UUID=d091040f77234c7283333f5cb958e223 --daemon=yes --systemd-run=no --uid=1000 --gid=1000 --displayfd=14
     99}}}