Package: x2goagent
Version: 3.5.0.32
As discussed with IONIC, there is a problem when You try to connect to
different servers from Windows at the same time, using multiple
instances of x2go client.
The reason is, that the x2go servers are all using the same SSH_Port.
That should not be a problem from my point of view, so that behaviour
should be further investigated.
The problem was reported already a very long time ago, but still exists
: https://www.mail-archive.com/x2go-user@lists.berlios.de/msg00547.html
In the meantime, here a small patch for x2gostartagent script:
That patch uses a different SSH_PORT for each Server, therefore try to
avoid conflicts.
There are two methods implemented :
method one, suitable for Class C Networks, with no possible conflicts.
The SSH Port is dependent on the last octet of the servers host adress.
method two, with randomized ports, what may lead to conflicts from case
to case, but can handle networks were servers might have the same last
octet of the host adress.
However, that patch enables to have multiple instances of x2goclients
running on one windows machine, against different hosts.
please find attached the IRC conversation log with Ionic, as well as the
patched script for x2gostartagent
I hove it can be committed, I am getting tired to patch my hosts on
every x2go server update ;-)
yours sincerely
Robert Nowotny
Rotek GmbH
Session Start: Mon Aug 17 12:51:17 2015
Session Ident: #x2go
03[12:51] * Now talking in #x2go
03[12:51] * Topic is 'X2Go is a suite to build Linux based terminal farms. The
channel's language is English. For further info on X2Go please visit:
http://www.x2go.org.'
03[12:51] * Set by MeinNameIstRetro on Wed Jun 24 22:59:11 2015
01[12:51] rnowotny good afternoon
01[12:57] rnowotny is there someone listening ?
[12:57] Ionic sometimes, yes...
01[12:57] rnowotny ;-)
01[12:58] rnowotny ok. first I have to say this is my first contact with x2go
development. Althought I use x2go for a long time, and vefore I was using nx.
01[12:58] rnowotny so please be pationt with me.
01[12:59] rnowotny patient
[13:00] Ionic ok?
01[13:00] rnowotny as I read, it is neccessary to edit the x2gostartagent,
SSH_Port=3 parameter for each host on the network, in order to be able to
connect to multiple hosts from one windows client (multiple instances of the
X2go client)
01[13:01] rnowotny I have written a small patch for the x2gostartagent, to
set the SSH_Port depending on the last octet of the servers IP Adress.
01[13:01] rnowotny I konw that might not be perfect, but should avoid
collisions on class C-Networks
[13:02] Ionic hum
[13:02] Ionic is it necessary to edit x2gostartagent? that sounds wierd
01[13:02] rnowotny I can provide the patch ( a few lines) - but I havent set
up GIT, so maybe someone more experienced than me can review and possibly
propose the patch on git.
[13:02] Ionic well we're probably using a fixed port number
01[13:03] rnowotny Ionic - yes
[13:03] Ionic but wouldn't the client also need a change?
01[13:03] rnowotny Port is fixed to 30001 - and is later checked in the
script if it is free
01[13:03] rnowotny Ionic, no
01[13:03] rnowotny no, client dont need to change
[13:03] Ionic hmhmhm
01[13:04] rnowotny I tested (well, others tested that before)
01[13:04] rnowotny and its working
01[13:05] rnowotny althought I dont know if there will be any side - effects
- but there should nor be some. Because the Script x2gostartagent try to find a
free port beginning from port 30001
[13:05] Ionic so, why would you need to change that starting port in the
first place?
01[13:06] rnowotny because You cant use multiple client sessions on windows
if the servers use all the same port
[13:06] Ionic well each session must use a different port which is also
registered in the DB, right?
01[13:06] rnowotny no
01[13:07] rnowotny it is the reverse port
01[13:08] rnowotny the problem is well aware, and already known and tested.
But users have to edit x2gostartagent manually, after each update
[13:09] Ionic well I'm not aware of it, at least not until now
01[13:09] rnowotny so I suggest to start to search for a free port from
30.000 + last octet of the IP adress - to avoid possible conflicts in most
cases.
01[13:10] rnowotny Ionic, one momet, I will give You the link to the post
[13:10] Ionic the last octet isn't really a good fingerprint
01[13:12] rnowotny
https://www.mail-archive.com/x2go-user@lists.berlios.de/msg00547.html
01[13:12] rnowotny check this out
01[13:13] rnowotny I know, using the last octet is not perfect.
[13:13] Ionic oh that's old
01[13:13] rnowotny But unless there is a better solution, it will avoid
collisions in most cases
01[13:14] rnowotny but we only have lets say 40.000 Ports available, so it is
not possible to map 256*256*256*256 IP4 Adresses to Ports ...
01[13:14] rnowotny yes, it is old, but still true
[13:14] Ionic I still don't understand why that is, though
01[13:14] rnowotny me