[winswitch] Unable to connect from Windows client to RHEL 7.4 xpra server using SSH (v2.3.2-r19729)

Ben Jackson Ben.Jackson at fidessa.com
Mon Jul 16 18:23:02 BST 2018


Antoine,

Thankyou kindly for getting back to me via the list.

Apologies, my company mail system blocked your reply, but I saw the digest.

In response to your queries:

>> I have installed Xpra as above and started the server successfully with "xpra start --start=xterm :1002".
>Does the server respond if you run:
>xpra info :1002

It does:

[ash at ukwok-pc1385-vpc7 ~]$ xpra info :1002 | wc -l
714

I can post the full output if you think it is useful.


>> - Using unauthenticated TCP _does_ work, but is not allowable in corporate env due to infosec.
>Maybe SSL mode would be allowed?

I expect so, thought the setup and certificate management could be painful at scale.

>> - Using PuTTY to connect to the host works (ditto using putty's plink to echo hello). No password is required (pageant is working) (command >putty\plink.exe -ssh ash at ukwok-pc1385-vpc7 echo hello). Hello is echo'd.
>Can you run "xpra list" from there and see the server?

Sure, so on the client:

C:\Program Files\Xpra>Xpra_Cmd list
Found the following xpra sessions:
Xpra:

Via PuTTY:

C:\Program Files\Xpra>"C:\Program Files (x86)\PuTTY\plink.exe" -ssh -l ash -T uk
wok-pc1385-vpc7 xpra list
Found the following xpra sessions:
/run/user/16095/xpra:
        LIVE session at :1002
/var/lib/ash/.xpra:
        LIVE session at :1002

Using plink bundled with Xpra:

C:\Program Files\Xpra>plink -ssh ash at ukwok-pc1385-vpc7 xpra list

C:\Program Files\Xpra>

On the server:

[ash at ukwok-pc1385-vpc7 ~]$ xpra list
Found the following xpra sessions:
/run/user/16095/xpra:
        LIVE session at :1002
/var/lib/ash/.xpra:
        LIVE session at :1002


>>From your log output, I see that your sockets are in an unusual location:
>created unix domain socket: /var/lib/ash/.xpra/ukwok-pc1385-vpc7-1002
>Why is that? Is your $HOME in /var/lib ?
>When connecting over ssh, CentOS fails to set XDG_RUNTIME_DIR correctly,
>{so this other default socket location may not be found either.
>We have code to try to workaround this problem, but this makes me think
>that maybe you want to try specifying --socket-dirs=/tmp at both ends to
>see if that helps.

Good spot, but yes, the user's home directory is actually /var/lib/ash in this case (for complex and uninteresting reasons!).

[ash at ukwok-pc1385-vpc7 ~]$ echo $HOME
/var/lib/ash

So I tried using --socket-dirs, as follows, with the same result:

Server:
[ash at ukwok-pc1385-vpc7 ~]$ xpra stop :1002
server requested disconnect:
 server shutdown
xpra at :1002 has exited.
[ash at ukwok-pc1385-vpc7 ~]$ xpra start --start=xterm --socket-dirs=/tmp :1002
seamless session now available on display :1002
[ash at ukwok-pc1385-vpc7 ~]$

Client:
C:\Program Files\Xpra>Xpra_Cmd attach ssh://ash@ukwok-pc1385-vpc7/1002 --socket-
dirs=/tmp
2018-07-16 18:11:28,344 Xpra gtk2 client version 2.3.2-r19729 64-bit
2018-07-16 18:11:28,350  running on Microsoft Windows 7
2018-07-16 18:11:31,992 Warning: failed to import opencv:
2018-07-16 18:11:31,993  DLL load failed: Invalid access to memory location.
2018-07-16 18:11:31,993  webcam forwarding is disabled
2018-07-16 18:11:32,953 GStreamer version 1.14.1 for Python 2.7.15 64-bit
2018-07-16 18:11:34,890 OpenGL_accelerate module loaded
2018-07-16 18:11:35,004 Using accelerated ArrayDatatype
2018-07-16 18:11:35,884 Warning: vendor 'Intel' is greylisted,
2018-07-16 18:11:35,885  you may want to turn off OpenGL if you encounter bugs
2018-07-16 18:11:36,003 OpenGL enabled with Intel(R) HD Graphics
2018-07-16 18:11:36,061  desktop size is 3000x1920 with 1 screen:
2018-07-16 18:11:36,062   Default (793x508 mm - DPI: 96x96)
2018-07-16 18:11:36,062     DISPLAY1 1920x1200 at 0x381 (677x423 mm - DPI: 72x72
) workarea: 1920x1200
2018-07-16 18:11:36,062     DISPLAY2 1080x1920 at 1920x0 (381x677 mm - DPI: 72x7
2) workarea: 1080x1920
2018-07-16 18:11:36,129  keyboard settings: layout=gb
2018-07-16 18:11:37,273 Error: failed to receive anything, not an xpra server?
2018-07-16 18:11:37,274   could also be the wrong protocol, username, password o
r port
2018-07-16 18:11:37,274 Connection lost
Traceback (most recent call last):
  File "./xpra/client/mixins/tray.py", line 54, in reset_icon
AttributeError: 'NoneType' object has no attribute 'icon_timestamp'


>> I'm looking for some advice on how to debug this. It looks like an environment issue (xpra doesn't seem to be getting any data back from plink?), but I'm a bit stuck.
>This sounds very similar to this ticket:
>http://xpra.org/trac/ticket/1892
>You may want to try the latest beta 2.4 build you can find.

It really does sound similar. Pretty much identical! Many apologies for not finding that before reporting a dup! I know how frustrating that can be.

I will try the latest beta builds from https://xpra.org/beta/windows/ and report back.

Thanks again for your rapid response!
Cheers,
Ben

-----Original Message-----
From: Ben Jackson
Sent: 13 July 2018 12:39
To: 'shifter-users at lists.devloop.org.uk'
Subject: Unable to connect from Windows client to RHEL 7.4 xpra server using SSH (v2.3.2-r19729)
Importance: High

Hi,

I'm completely new to Xpra, so please forgive me if I'm not providing the right diagnostics ;)

Quick summary:

when trying to connect xpra from Windows 7 to RHEL 7.4 over SSH, the connection fails with the following message:

2018-07-13 12:21:02,765 Error: failed to receive anything, not an xpra server?
2018-07-13 12:21:02,765   could also be the wrong protocol, username, password or port

The client and server versions are the same, and the ssh connection appears to work in any other context I can try it.

Detail:

My setup is:
- Server:
  - RHEL 7.4
  - Xpra 2.3.2-v19729 using the yum repo (I tried the latest 2.3.3-..., but downgraded to ensure the client/serer were same version for testing)
  - Python 2.7.5
  - public key in authorized_keys
- Client:
  - Windows 7 Pro
  - Xpra 2.3.2-v19729 (latest MSI on website)
  - Python 2.7.9 (not sure if the windows package uses python from my path)
 - Pageant running with private ssh key

I have installed Xpra as above and started the server successfully with "xpra start --start=xterm :1002".

However, when I attempt to connect from windows to the server using "Xpra_Cmd attach ssh://ash@ukwok-pc1385-vpc7/1002" it fails to connect and  I get the following.

2018-07-13 12:20:59,173 Xpra gtk2 client version 2.3.2-r19729 64-bit
2018-07-13 12:20:59,179  running on Microsoft Windows 7
2018-07-13 12:20:59,363 Warning: failed to import opencv:
2018-07-13 12:20:59,363  DLL load failed: Invalid access to memory location.
2018-07-13 12:20:59,363  webcam forwarding is disabled
2018-07-13 12:21:00,192 GStreamer version 1.14.1 for Python 2.7.15 64-bit
2018-07-13 12:21:00,593 OpenGL_accelerate module loaded
2018-07-13 12:21:00,627 Using accelerated ArrayDatatype
2018-07-13 12:21:01,296 Warning: vendor 'Intel' is greylisted,
2018-07-13 12:21:01,296  you may want to turn off OpenGL if you encounter bugs
2018-07-13 12:21:01,357 OpenGL enabled with Intel(R) HD Graphics
2018-07-13 12:21:01,428  desktop size is 3000x1920 with 1 screen:
2018-07-13 12:21:01,428   Default (793x508 mm - DPI: 96x96)
2018-07-13 12:21:01,428     DISPLAY1 1920x1200 at 0x381 (677x423 mm - DPI: 72x72) workarea: 1920x1200
2018-07-13 12:21:01,428     DISPLAY2 1080x1920 at 1920x0 (381x677 mm - DPI: 72x72) workarea: 1080x1920
2018-07-13 12:21:01,442  keyboard settings: layout=gb
2018-07-13 12:21:02,765 Error: failed to receive anything, not an xpra server?
2018-07-13 12:21:02,765   could also be the wrong protocol, username, password or port
2018-07-13 12:21:02,765 Connection lost

(Full client and server log output with debug can be found in this gist: https://gist.github.com/puremourning/36d6beb1d0baefe3cb0b79ec7cbfe3dd).

The server log does not change during the process (tailing /var/user/<uid>/:1002.log).

I'm looking for some advice on how to debug this. It looks like an environment issue (xpra doesn't seem to be getting any data back from plink?), but I'm a bit stuck.

Some things I have tried/confirmed:

- Using unauthenticated TCP _does_ work, but is not allowable in corporate env due to infosec.
- Using PuTTY to connect to the host works (ditto using putty's plink to echo hello). No password is required (pageant is working) (command putty\plink.exe -ssh ash at ukwok-pc1385-vpc7 echo hello). Hello is echo'd.
- Using the bundled plink.exe (tortoise?) to connect to the account/host in question, no password is requested, but "hello" is *not* printed (command: plink -ssh ash at ukwok-pc1385-vpc7 echo hello)
- Before setting up pageant (i.e. ssh-agent), all the above were tested while entering the account password manually, with the same results.
- Using a proprietary windows x-server, I am able to connect to xpra from the server (i.e. to itself) with xpra attach. (i.e. start an xterm with display pointed at windows X server, attach to xpra, see xterm)

Many thanks for any advice you may be able to provide. Naturally if there is any further information I can provide, just shout!

Cheers,
Ben



This message is intended only for the stated addressee(s) and may be confidential. Access to this email by anyone else is unauthorised. Any opinions expressed in this email do not necessarily reflect the opinions of Fidessa. Any unauthorised disclosure, use or dissemination, either whole or in part is prohibited. If you are not the intended recipient of this message, please notify the sender immediately.
Fidessa plc registered in England and Wales no. 3781700. VAT registration no. GB688900878. Registered office - Dukes Court, Duke Street, Woking, Surrey, GU21 5BH, UK
Fidessa buy-side ltd registered in England and Wales no. 3656437. VAT registration no. GB688900878. Registered office - Dukes Court, Duke Street, Woking, Surrey, GU21 5BH, UK
Fidessa group plc registered in England and Wales no. 3234176. VAT registration no. GB688900878. Registered office - Dukes Court, Duke Street, Woking, Surrey, GU21 5BH, UK



More information about the shifter-users mailing list