[winswitch] Random connection drops in browser client

Antoine Martin antoine at nagafix.co.uk
Tue Dec 1 05:29:24 GMT 2020


On 01/12/2020 06:23, Michael Cronenworth via shifter-users wrote:
> Hi,
> 
> I have had an issue with Xpra dropping and reconnecting sessions while
> using applications inside the web browser client. I have experienced
> this for several months and logs do not show a reason. Currently I'm
> using Xpra 4.0.5.
Does this also occur if you connect a regular python client to the same
session?

> I can leave a session open for hours without reconnect attempts if I
> leave an application open and idle so I do not feel this is a network
> connectivity issue. It's only randomly reconnecting after clicking
> around applications, such as Firefox, inside a session. The randomness
> frequency is anywhere from once per 5 minutes to a few times per minute.
> It is not isolated to a single application.
> 
> Server side logs show the client disconnected and then reconnected. No
> warnings or other errors.
Can you try to run your server with --debug=network and post the last
few messages just before the client disconnection message?

> Client side browser logs show:
> websocket closed: undefined reason: null, reconnect: true, reconnect
> attempt: 0
That's quite odd. The "websocket closed" event can only come from 3 places:
* the server sending a "close" message (which would include a reason)
* a protocol error in the HTML5 client (also includes a message)
* the browser tears it down unceremoniously

Only the last one would not include a "reason" message.
Applying this patch will now include more details:
http://xpra.org/trac/changeset/28048/xpra
You can either apply it by hand or use the copy found here:
http://xpra.org/html5/connect.html

Other things worth trying:
* use a tunnel to ensure that the websocket traffic isn't modified
* use wireshark to inspect the last few packets before the connection
drops (you should be able to see which end is closing first)

> connection-list
> ... tries to reconnect to server ...
> (web browser shows session for a second)
> connection-established
> update encodings: (encodings listed...)
> ping timeout - reconnecting
> ... tries to reconnect to server ...
> (this can cycle once, or a half-dozen times in a row, until finally....)
> connection-established
> update encodings: (encodings listed...)
> server connection is OK
> 
> The session is then "stable" until the next reconnection episode.
> 
> Any ideas as to the cause?
I'm afraid not. Please try the steps above, and if that does not help,
file a ticket.

Cheers,
Antoine

> 
> Thanks,
> Michael



More information about the shifter-users mailing list