Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.95k stars 169 forks source link

xpra attach from wayland to x11: "connection timed out" #4254

Closed thomas725 closed 4 months ago

thomas725 commented 4 months ago

Describe the bug xpra attach from wayland to x11: "connection timed out"

To Reproduce Steps to reproduce the behavior:

  1. start shadow session on client
  2. xpra attach ssh://server/0
  3. can't connect, see output below

System Information (please complete the following information):

client connection failure log

$ xpra attach ssh://server/0
2024-06-13 13:25:00,712 Xpra GTK3 Wayland client version 6.0-r0
2024-06-13 13:25:00,839  running on Linux ManjaroLinux 24.0.2 Wynsdey
2024-06-13 13:25:00,839  cpython 3.12
2024-06-13 13:25:00,839  window manager is 'KDE on wayland'
2024-06-13 13:25:05,038 GStreamer version 1.24.3
2024-06-13 13:25:05,307 created unix domain sockets:
2024-06-13 13:25:05,308  '/run/user/1000/xpra/clients/client-hostname-57189'
2024-06-13 13:25:06,482 Warning: incomplete keymap support under Wayland
/usr/lib/python3.12/site-packages/OpenGL/platform/egl.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='/proc/cpuinfo' mode='r' encoding='UTF-8'>
  info = open('/proc/cpuinfo').read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2024-06-13 13:25:06,539 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2024-06-13 13:25:07,593 OpenGL enabled on 'Mesa Intel(R) Graphics (RPL-P)'
2024-06-13 13:25:08,026 Connected (version 2.0, client OpenSSH_8.9p1)
2024-06-13 13:25:08,585 loaded RSA private key from '/home/user/.ssh/id_rsa'
2024-06-13 13:25:08,610 Authentication (publickey) successful!
2024-06-13 13:25:08,831 ssh server OS is 'linux-gnu'
2024-06-13 13:25:08,996 paramiko SSH agent forwarding enabled
2024-06-13 13:25:09,061  keyboard settings: layout=at
2024-06-13 13:25:09,066  desktop size is 1600x1000:
2024-06-13 13:25:09,067   wayland-0 (340x220 mm - DPI: 120x115)
2024-06-13 13:25:09,068     eDP-1-unknown
2024-06-13 13:25:39,065 connection timed out
2024-06-13 13:25:39,085 SSH EOF on stderr of run-xpra
2024-06-13 13:25:39,090 removing unix domain socket '/run/user/1000/xpra/clients/client-hostname-57189'
totaam commented 4 months ago

start shadow session on client

You mean on server, right? What is the command used?

version 6.0-r0 Xpra Server Version v3.1

This is out of date - probably won't work.

2024-06-13 13:25:39,085 SSH EOF on stderr of run-xpra

Try adding -d ssh to your client to see the full ssh events.

But really, this is not supposed to work, see https://github.com/Xpra-org/xpra/wiki/Versions

thomas725 commented 4 months ago

Thanks for the explanations! Yes I meant start shadow on server.

I figured I need to update the servers xpra version. Is there a debian repository I can put into a /etc/apt/sources.list.d/xpra.list file? Or do I need to download a *.deb package and install it manually?

The output with -d ssh:

xpra -d ssh attach ssh://server-hostname/0
2024-06-13 15:52:06,022 Xpra GTK3 Wayland client version 6.0-r0
2024-06-13 15:52:06,150  running on Linux ManjaroLinux 24.0.2 Wynsdey
2024-06-13 15:52:06,150  cpython 3.12
2024-06-13 15:52:06,151  window manager is 'KDE on wayland'
2024-06-13 15:52:10,318 GStreamer version 1.24.3
2024-06-13 15:52:10,544 created unix domain sockets:
2024-06-13 15:52:10,544  '/run/user/1000/xpra/clients/client-hostname-80871'
2024-06-13 15:52:11,686 Warning: incomplete keymap support under Wayland
/usr/lib/python3.12/site-packages/OpenGL/platform/egl.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper name='/proc/cpuinfo' mode='r' encoding='UTF-8'>
  info = open('/proc/cpuinfo').read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2024-06-13 15:52:11,745 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
2024-06-13 15:52:12,784 OpenGL enabled on 'Mesa Intel(R) Graphics (RPL-P)'
2024-06-13 15:52:13,107 debug enabled for ['xpra.scripts.parsing', 'ssh']
2024-06-13 15:52:13,107 using paramiko ssh backend
2024-06-13 15:52:13,108 debug enabled for ['xpra.scripts.parsing', 'ssh']
2024-06-13 15:52:13,109 using paramiko ssh backend
2024-06-13 15:52:13,130 debug enabled for ['xpra.net.ssh.paramiko_client', 'network', 'ssh']
2024-06-13 15:52:13,131 connect_to({'display_name': 'ssh://server-hostname/0', 'cmdline': ['/usr/bin/xpra', '-d', 'ssh', 'attach', 'ssh://server-hostname/0'], 'type': 'ssh', 'proxy_command': ['_proxy'], 'exit_ssh': True, 'remote_xpra': ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], 'username': '', 'host': 'server-hostname', 'local': False, 'port': 22, 'display': '0', 'display_as_args': ['0', '--env=SSH_AGENT_UUID=*****'], 'is_paramiko': True, 'agent': True, 'ssh-agent-uuid': '*****', 'full_ssh': ['paramiko']})
2024-06-13 15:52:13,140 parsed ssh config '/home/user/.ssh/config'
2024-06-13 15:52:13,140 63 hosts found
2024-06-13 15:52:13,177 host_config(server-hostname)={'hostname': 'server-domain', 'identityfile': ['/home/user/.ssh/id_rsa'], 'user': 'thomas'}
2024-06-13 15:52:13,178 got host config for 'server-hostname': {'hostname': 'server-domain', 'identityfile': ['/home/user/.ssh/id_rsa'], 'user': 'thomas'}
2024-06-13 15:52:13,178 authentication modes=['none', 'agent', 'key', 'password']
2024-06-13 15:52:13,184 paramiko socket_connect: sockname=('client-ip', 60404), peername=('server-ip', 22)
2024-06-13 15:52:13,185 SSH transport <paramiko.Transport at 0x5c30f170 (unconnected)>
2024-06-13 15:52:13,186 starting thread (client mode): 0x5c30f170
2024-06-13 15:52:13,187 Local version/idstring: SSH-2.0-paramiko_3.4.0
2024-06-13 15:52:13,217 Remote version/idstring: SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.7
2024-06-13 15:52:13,217 Connected (version 2.0, client OpenSSH_8.9p1)
2024-06-13 15:52:13,220 === Key exchange possibilities ===
2024-06-13 15:52:13,220 kex algos: curve25519-sha256, curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, sntrup761x25519-sha512@openssh.com, diffie-hellman-group-exchange-sha256, diffie-hellman-group16-sha512, diffie-hellman-group18-sha512, diffie-hellman-group14-sha256, kex-strict-s-v00@openssh.com
2024-06-13 15:52:13,221 server key: rsa-sha2-512, rsa-sha2-256, ecdsa-sha2-nistp256, ssh-ed25519
2024-06-13 15:52:13,221 client encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com
2024-06-13 15:52:13,221 server encrypt: chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com
2024-06-13 15:52:13,221 client mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1
2024-06-13 15:52:13,221 server mac: umac-64-etm@openssh.com, umac-128-etm@openssh.com, hmac-sha2-256-etm@openssh.com, hmac-sha2-512-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, umac-128@openssh.com, hmac-sha2-256, hmac-sha2-512, hmac-sha1
2024-06-13 15:52:13,221 client compress: none, zlib@openssh.com
2024-06-13 15:52:13,221 server compress: none, zlib@openssh.com
2024-06-13 15:52:13,222 client lang: <none>
2024-06-13 15:52:13,222 server lang: <none>
2024-06-13 15:52:13,222 kex follows: False
2024-06-13 15:52:13,222 === Key exchange agreements ===
2024-06-13 15:52:13,222 Strict kex mode: True
2024-06-13 15:52:13,222 Kex: curve25519-sha256@libssh.org
2024-06-13 15:52:13,223 HostKey: ssh-ed25519
2024-06-13 15:52:13,223 Cipher: aes128-ctr
2024-06-13 15:52:13,223 MAC: hmac-sha2-256
2024-06-13 15:52:13,223 Compression: none
2024-06-13 15:52:13,223 === End of kex handshake ===
2024-06-13 15:52:13,275 Resetting outbound seqno after NEWKEYS due to strict mode
2024-06-13 15:52:13,276 kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>
2024-06-13 15:52:13,278 Switch to new keys ...
2024-06-13 15:52:13,279 Resetting inbound seqno after NEWKEYS due to strict mode
2024-06-13 15:52:13,279 do_connect_to(<paramiko.Transport at 0x5c30f170 (cipher aes128-ctr, 128 bits) (connected; awaiting auth)>, 'server-domain', 'thomas', '', {'hostname': 'server-domain', 'identityfile': ['/home/user/.ssh/id_rsa'], 'user': 'thomas'}, ['/home/user/.ssh/id_rsa'], {'display_name': 'ssh://server-hostname/0', 'cmdline': ['/usr/bin/xpra', '-d', 'ssh', 'attach', 'ssh://server-hostname/0'], 'type': 'ssh', 'proxy_command': ['_proxy'], 'exit_ssh': True, 'remote_xpra': ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], 'username': '', 'host': 'server-hostname', 'local': False, 'port': 22, 'display': '0', 'display_as_args': ['0', '--env=SSH_AGENT_UUID=*****'], 'is_paramiko': True, 'agent': True, 'ssh-agent-uuid': '*****', 'full_ssh': ['paramiko']})
2024-06-13 15:52:13,280 remote_server_key=MD5:31:1c:08:e9:24:33:f9:85:8b:13:bd:a6:8c:83:f8:a0
2024-06-13 15:52:13,281 Got EXT_INFO: {'server-sig-algs': b'ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com', 'publickey-hostbound@openssh.com': b'0'}
2024-06-13 15:52:13,453 HostKeys.load(/home/user/.ssh/known_hosts) successful
2024-06-13 15:52:13,454 host keys=<paramiko.hostkeys.HostKeys object at 0x7f425c165e20>
2024-06-13 15:52:13,459 ed25519 host key 'MD5:31:1c:08:e9:24:33:f9:85:8b:13:bd:a6:8c:83:f8:a0' OK for host 'server-domain'
2024-06-13 15:52:13,459 starting authentication, authentication methods: ['none', 'agent', 'key', 'password']
2024-06-13 15:52:13,459 auth=none
2024-06-13 15:52:13,459 trying none authentication
2024-06-13 15:52:13,465 userauth is OK
2024-06-13 15:52:13,476 Authentication type (none) not permitted.
2024-06-13 15:52:13,476 Allowed methods: ['publickey', 'password']
2024-06-13 15:52:13,477 auth_none()
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/xpra/net/ssh/paramiko_client.py", line 691, in auth_none
    transport.auth_none(username)
  File "/usr/lib/python3.12/site-packages/paramiko/transport.py", line 1540, in auth_none
    return self.auth_handler.wait_for_response(my_event)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/paramiko/auth_handler.py", line 263, in wait_for_response
    raise e
paramiko.ssh_exception.BadAuthenticationType: Bad authentication type; allowed types: ['publickey', 'password']
2024-06-13 15:52:13,483 auth=agent
2024-06-13 15:52:13,483 agent keys: ()
2024-06-13 15:52:13,484 auth=key
2024-06-13 15:52:13,484 trying public key authentication using ['/home/user/.ssh/id_rsa']
2024-06-13 15:52:13,484 trying '/home/user/.ssh/id_rsa'
2024-06-13 15:52:13,484 trying to load as RSA
2024-06-13 15:52:13,785 loaded RSA private key from '/home/user/.ssh/id_rsa'
2024-06-13 15:52:13,787 auth_publickey using '/home/user/.ssh/id_rsa' as RSA: MD5:04:2d:2b:cd:e7:3b:61:90:68:1d:77:a3:2b:68:f0:5d
2024-06-13 15:52:13,792 userauth is OK
2024-06-13 15:52:13,793 Finalizing pubkey algorithm for key of type 'ssh-rsa'
2024-06-13 15:52:13,793 Our pubkey algorithm list: ['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa']
2024-06-13 15:52:13,793 Server-side algorithm list: ['ssh-ed25519', 'sk-ssh-ed25519@openssh.com', 'ssh-rsa', 'rsa-sha2-256', 'rsa-sha2-512', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', 'webauthn-sk-ecdsa-sha2-nistp256@openssh.com']
2024-06-13 15:52:13,793 Agreed upon 'rsa-sha2-512' pubkey algorithm
2024-06-13 15:52:13,822 Authentication (publickey) successful!
2024-06-13 15:52:13,823 run_remote_xpra(<paramiko.Transport at 0x5c30f170 (cipher aes128-ctr, 128 bits) (active; 0 open channel(s))>, ['_proxy'], ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], '', ['0', '--env=SSH_AGENT_UUID=*****'], {'display_name': 'ssh://server-hostname/0', 'cmdline': ['/usr/bin/xpra', '-d', 'ssh', 'attach', 'ssh://server-hostname/0'], 'type': 'ssh', 'proxy_command': ['_proxy'], 'exit_ssh': True, 'remote_xpra': ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], 'username': '', 'host': 'server-hostname', 'local': False, 'port': 22, 'display': '0', 'display_as_args': ['0', '--env=SSH_AGENT_UUID=*****'], 'is_paramiko': True, 'agent': True, 'ssh-agent-uuid': '*****', 'full_ssh': ['paramiko']})
2024-06-13 15:52:13,824 will try to run xpra from: ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe']
2024-06-13 15:52:13,824 run_test_command(transport, echo %OS%)
2024-06-13 15:52:13,825 [chan 0] Max packet in: 4096 bytes
2024-06-13 15:52:13,918 Received global request "hostkeys-00@openssh.com"
2024-06-13 15:52:13,919 Rejecting "hostkeys-00@openssh.com" global request from server.
2024-06-13 15:52:13,920 Debug msg: b'/home/thomas/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding'
2024-06-13 15:52:13,962 [chan 0] Max packet out: 32768 bytes
2024-06-13 15:52:13,962 Secsh channel 0 opened.
2024-06-13 15:52:13,968 [chan run-test:echo %OS%] Sesch channel 0 request ok
2024-06-13 15:52:13,969 exec_command('echo %OS%') returned
2024-06-13 15:52:13,969 exit status is not ready yet, sleeping
2024-06-13 15:52:13,973 [chan run-test:echo %OS%] EOF received (run-test:echo %OS%)
2024-06-13 15:52:13,974 [chan run-test:echo %OS%] EOF sent (run-test:echo %OS%)
2024-06-13 15:52:13,980 exec_command('echo %OS%')=0
2024-06-13 15:52:13,980 exec_command out=['%OS%\n']
2024-06-13 15:52:13,981 exec_command err=[]
2024-06-13 15:52:13,981 echo %OS%='%OS%'
2024-06-13 15:52:13,981 run_test_command(transport, echo $OSTYPE)
2024-06-13 15:52:13,982 [chan 1] Max packet in: 4096 bytes
2024-06-13 15:52:14,021 [chan 1] Max packet out: 32768 bytes
2024-06-13 15:52:14,022 Secsh channel 1 opened.
2024-06-13 15:52:14,026 [chan run-test:echo $OSTYPE] Sesch channel 1 request ok
2024-06-13 15:52:14,026 exec_command('echo $OSTYPE') returned
2024-06-13 15:52:14,027 exit status is not ready yet, sleeping
2024-06-13 15:52:14,028 [chan run-test:echo $OSTYPE] EOF received (run-test:echo $OSTYPE)
2024-06-13 15:52:14,029 [chan run-test:echo $OSTYPE] EOF sent (run-test:echo $OSTYPE)
2024-06-13 15:52:14,037 exec_command('echo $OSTYPE')=0
2024-06-13 15:52:14,038 exec_command out=['linux-gnu\n']
2024-06-13 15:52:14,039 exec_command err=[]
2024-06-13 15:52:14,039 OSTYPE='linux-gnu'
2024-06-13 15:52:14,039 ssh server OS is 'linux-gnu'
2024-06-13 15:52:14,040 run_test_command(transport, command)
2024-06-13 15:52:14,040 [chan 2] Max packet in: 4096 bytes
2024-06-13 15:52:14,082 [chan 2] Max packet out: 32768 bytes
2024-06-13 15:52:14,082 Secsh channel 2 opened.
2024-06-13 15:52:14,089 [chan run-test:command] Sesch channel 2 request ok
2024-06-13 15:52:14,089 exec_command('command') returned
2024-06-13 15:52:14,090 exit status is not ready yet, sleeping
2024-06-13 15:52:14,095 [chan run-test:command] EOF received (run-test:command)
2024-06-13 15:52:14,097 [chan run-test:command] EOF sent (run-test:command)
2024-06-13 15:52:14,100 exec_command('command')=0
2024-06-13 15:52:14,101 exec_command out=[]
2024-06-13 15:52:14,101 exec_command err=[]
2024-06-13 15:52:14,101 run_test_command(transport, command -v xpra)
2024-06-13 15:52:14,102 [chan 3] Max packet in: 4096 bytes
2024-06-13 15:52:14,145 [chan 3] Max packet out: 32768 bytes
2024-06-13 15:52:14,146 Secsh channel 3 opened.
2024-06-13 15:52:14,151 [chan run-test:command -v xpra] Sesch channel 3 request ok
2024-06-13 15:52:14,152 exec_command('command -v xpra') returned
2024-06-13 15:52:14,152 exit status is not ready yet, sleeping
2024-06-13 15:52:14,157 [chan run-test:command -v xpra] EOF received (run-test:command -v xpra)
2024-06-13 15:52:14,158 [chan run-test:command -v xpra] EOF sent (run-test:command -v xpra)
2024-06-13 15:52:14,163 exec_command('command -v xpra')=0
2024-06-13 15:52:14,164 exec_command out=['/usr/bin/xpra\n']
2024-06-13 15:52:14,164 exec_command err=[]
2024-06-13 15:52:14,164 adding xpra_cmd='/usr/bin/xpra'
2024-06-13 15:52:14,165 cmd(['_proxy'], ['0', '--env=SSH_AGENT_UUID=*****'])="/usr/bin/xpra" "_proxy" "0" "--env=SSH_AGENT_UUID=*****"
2024-06-13 15:52:14,165 trying to open SSH session, window-size=134217727, timeout=60
2024-06-13 15:52:14,166 [chan 4] Max packet in: 4096 bytes
2024-06-13 15:52:14,207 [chan 4] Max packet out: 32768 bytes
2024-06-13 15:52:14,207 Secsh channel 4 opened.
2024-06-13 15:52:14,208 paramiko agent_option='True'
2024-06-13 15:52:14,208 paramiko SSH agent forwarding enabled
2024-06-13 15:52:14,209 channel exec_command('"/usr/bin/xpra" "_proxy" "0" "--env=SSH_AGENT_UUID=*****"')
2024-06-13 15:52:14,255 [chan run-xpra] Sesch channel 4 request ok
2024-06-13 15:52:14,256 exec_command sent, returning channel for service
2024-06-13 15:52:14,258 paramiko_client.connect_to({'display_name': 'ssh://server-hostname/0', 'cmdline': ['/usr/bin/xpra', '-d', 'ssh', 'attach', 'ssh://server-hostname/0'], 'type': 'ssh', 'proxy_command': ['_proxy'], 'exit_ssh': True, 'remote_xpra': ['xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', '/usr/local/bin/xpra', '~/.xpra/run-xpra', 'Xpra_cmd.exe'], 'username': '', 'host': 'server-hostname', 'local': False, 'port': 22, 'display': '0', 'display_as_args': ['0', '--env=SSH_AGENT_UUID=*****'], 'is_paramiko': True, 'agent': True, 'ssh-agent-uuid': '*****', 'full_ssh': ['paramiko']})=ssh socket: client-ip:60404 <- server-ip:22
2024-06-13 15:52:14,271  keyboard settings: layout=at
2024-06-13 15:52:14,276  desktop size is 1600x1000:
2024-06-13 15:52:14,278   wayland-0 (340x220 mm - DPI: 120x115)
2024-06-13 15:52:14,278     eDP-1-unknown
2024-06-13 15:52:44,263 connection timed out
2024-06-13 15:52:44,282 [chan run-xpra] EOF sent (run-xpra)
2024-06-13 15:52:44,284 SSH EOF on stderr of run-xpra
2024-06-13 15:52:44,289 removing unix domain socket '/run/user/1000/xpra/clients/client-hostname-80871'
totaam commented 4 months ago

https://github.com/Xpra-org/xpra/wiki/Download#-for-debian-based-distributions

thomas725 commented 4 months ago

Thanks, I've now upgraded the server version and found this problem: https://github.com/Xpra-org/xpra/issues/4255 I've tried rebooting the server but it still shows the same behavior.