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] good afternoon
01[12:57] is there someone listening ?
[12:57] sometimes, yes...
01[12:57] ;-)
01[12:58] 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] so please be pationt with me.
01[12:59] patient
[13:00] ok?
01[13:00] 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] 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] I konw that might not be perfect, but should avoid
collisions on class C-Networks
[13:02] hum
[13:02] is it necessary to edit x2gostartagent? that sounds wierd
01[13:02] 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] well we're probably using a fixed port number
01[13:03] Ionic - yes
[13:03] but wouldn't the client also need a change?
01[13:03] Port is fixed to 30001 - and is later checked in the
script if it is free
01[13:03] Ionic, no
01[13:03] no, client dont need to change
[13:03] hmhmhm
01[13:04] I tested (well, others tested that before)
01[13:04] and its working
01[13:05] 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] so, why would you need to change that starting port in the
first place?
01[13:06] because You cant use multiple client sessions on windows
if the servers use all the same port
[13:06] well each session must use a different port which is also
registered in the DB, right?
01[13:06] no
01[13:07] it is the reverse port
01[13:08] the problem is well aware, and already known and tested.
But users have to edit x2gostartagent manually, after each update
[13:09] well I'm not aware of it, at least not until now
01[13:09] 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] Ionic, one momet, I will give You the link to the post
[13:10] the last octet isn't really a good fingerprint
01[13:12]
https://www.mail-archive.com/x2go-user@lists.berlios.de/msg00547.html
01[13:12] check this out
01[13:13] I know, using the last octet is not perfect.
[13:13] oh that's old
01[13:13] But unless there is a better solution, it will avoid
collisions in most cases
01[13:14] 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] yes, it is old, but still true
[13:14] I still don't understand why that is, though
01[13:14] me neither
[13:14] does the client connect back to the server?
[13:14] err
01[13:14] because it should be able to handle the same port from
different hosts
[13:14] other way around
[13:14] does the server connect back to the client?
01[13:15] I don