<br><font size=2 face="Arial"><b>John H <lmindnix@gmail.com></b>
Sent by: "FreeNX-kNX" <freenx-knx-bounces@kde.org> 11/03/2015
22:33 Please respond to User Support for FreeNX Server and kNX Client <freenx-knx@kde.org></font>
<p>
<br><font size=2 face="Arial">Hey all. Having issues with TCP port
binding on the server from client. </font>
<br>
<br><font size=2 color=red face="Arial"><SNIP></font>
<br><font size=2 face="Arial"><br>
Error: Call to bind failed for TCP port 35022. Error is 98 'Address already
in use'.<br>
Error: Aborting session with 'Unable to open display 'nx/nx,options=/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60/options:31022''.<br>
<br>
I've seen this discussed in previous threads here:</font><font size=2 color=blue face="Arial"><u><br>
</u></font><a href="http://marc.info/?l=freenx-knx&m=138442658819979&w=2"><font size=2 color=blue face="Arial"><u>http://marc.info/?l=freenx-knx&m=138442658819979&w=2</u></font></a><font size=2 face="Arial"><br>
</font>
<br><font size=2 color=red face="Arial">YUP</font>
<br>
<br><font size=2 face="Arial">Checking port 35022 reveals that it's in
use by LDAP, bound to a different user on that NX server.</font>
<br>
<br><font size=2 color=red face="Arial">YUP - and of course something has
to give somewhere</font>
<br>
<br>
<br><font size=2 face="Arial">So, we're trying to figure out the best way
to change the port, either from the client or the server, that would result
in a successful login.</font>
<br><font size=2 face="Arial">Currently, the symptoms are, double-click
connection name from NoMachine app, it requests password, password success,
requests session type (Gnome, KDE, etc) and once that session type is selected,
it hangs at "Creating session". </font>
<br><font size=2 face="Arial">I've tried going into the testuser's ~/.nx/config/blade015.nxs
and changing the NoMachine daemon port from 4000 to 4001, but that doesn't
seem to have the intended effect as, after having saved the change, then
closing and re-opening the NoMachine client to reconnect changes that value
back to 4000. </font>
<br><font size=2 face="Arial">I can't change the server variable "DISPLAY_BASE="
because others are connected to it, but I feel pretty confident that if/when
their connection is dropped, they'll be faced with the same issues as our
testuser. </font>
<br>
<br><font size=2 color=red face="Arial">Sounds like you have the 6000 4000
bug in nxserver.</font>
<br>
<br><font size=2 color=red face="Arial"> Can you see:-</font>
<br>
<br><font size=2 color=red face="Arial">
# Check
if there is already an agent running on that display on that host</font>
<br><font size=2 color=red face="Arial">
let AGENT_DISPLAY=$SESS_DISPLAY+6000</font>
<br><font size=2 color=red face="Arial">somewhere near line No. 1450 in</font>
<br>
<br><font size=2 color=red face="Arial">
/usr/bin/nxserver</font>
<br>
<br><font size=2 color=red face="Arial">If you do, try setting </font>
<br>
<br><font size=2 color=red face="Arial">
let AGENT_DISPLAY=$SESS_DISPLAY+</font><font size=2 color=green face="Arial">4000</font>
<br>
<br><font size=2 color=red face="Arial">and see if that fixes it ( by skipping
over any used ports)</font>
<br>
<br><font size=2 color=blue face="Arial"> Please let us know if it
works before/after</font>
<br><font size=2 color=blue face="Arial">so</font>
<br><font size=2 color=blue face="Arial">Akemi can update it ( if he's
still around and can be bothered )</font>
<br>
<br>
<br><font size=2 color=red face="Arial">NOTA BENE this ** WONT**
stop the reverse problem occuring if someone has decided to grab
35022 all the time and finds it's used by FreeNX !!!!</font>
<br>
<br>
<br><font size=2 color=red face="Arial">Mostly no one's sessions run into
anything else because the default is 1000 or 2000 3000 etc if you have
several FreeNX servers not 35000 or so which you seem to have set.</font>
<br>
<br>
<br>
<br><font size=2 color=red face="Arial">NOTES</font>
<br><font size=2 color=red face="Arial">------------</font>
<br>
<br><font size=2 color=red face="Arial">The </font>
<br><font size=2 color=red face="Arial"> DISPLAY_BASE=</font>
<br>
<br><font size=2 color=red face="Arial"> FreeNX server parameter sets
the base number or starting value for that FreeNX server, from which the
connecting users are allocated in turn, one at a time a</font>
<br>
<br><font size=2 color=red face="Arial"> "session
display base"</font>
<br>
<br><font size=2 color=red face="Arial">from which various display/port
values are calculated by adding a value hard wired into the code</font>
<br>
<br><font size=2 color=red face="Arial">eg in original nxserver</font>
<br>
<br>
<br><font size=2 color=red face="Arial">SESS_DISPLAY=$DISPLAY_BASE
</font><font size=2 color=blue face="Arial">#
used for apps ie the session env $DISPLAY</font><font size=2 color=red face="Arial">
</font>
<br><font size=2 color=red face="Arial">let PROXY_DISPLAY=$SESS_DISPLAY+4000
</font><font size=2 color=blue face="Arial">#
the one you're (probably) having problems with</font>
<br>
<br><font size=2 color=red face="Arial">let AGENT_DISPLAY=$SESS_DISPLAY+6000
</font><font size=2 color=blue face="Arial">#
bug should be 4000</font>
<br><font size=2 color=red face="Arial">let SAMBA_DISPLAY=$SESS_DISPLAY+3000</font>
<br><font size=2 color=red face="Arial">let MEDIA_DISPLAY=$SESS_DISPLAY+7000</font>
<br><font size=2 color=red face="Arial">let CUPS_DISPLAY=$SESS_DISPLAY+9000
</font><font size=2 color=blue face="Arial">#
bug should be 9090 see below</font>
<br>
<br><font size=2 color=red face="Arial">The four above are part of session
set-up test code, only used to see if the ports are free - if not then
a new SESS_DISPLAY++ is tried </font>
<br>
<br><font size=2 color=red face="Arial">see in nxnode where it all actually
happens</font>
<br>
<br><font size=2 color=red face="Arial">let ESPEAKER=$display+7000</font>
<br><font size=2 color=red face="Arial">let NXSAMBA_PORT=$display+3000</font>
<br><font size=2 color=red face="Arial">let NODE_CUPSD_PORT=$display+9090
</font><font size=2 color=blue face="Arial">#
should be same as above</font>
<br>
<br>
<br>
<br><font size=2 color=red face="Arial">In this instance your server's
DISPLAY_BASE is set to something near the 31022 - maybe 31000 with
21 users already connected from which 4000 is added to give the 35022</font>
<br>
<br><font size=2 color=red face="Arial">You might be safer going back to
2000 to keep away from anything else in user-land</font>
<br>
<br><font size=2 color=green face="Arial"> NOTE you CAN change the
display base because it won't affect any RUNNING sessions. You are probably
best advised not to restart the "service" tho</font>
<br>
<br>
<br>
<br>
<br><font size=2 color=red face="Arial">"Strangely", this "session
display base" number is handed over to the nx client which then
uses this same number for its X server ( or client in normal speak)</font>
<br><font size=2 color=red face="Arial">and then builds its connection
parameter string to send to the server, requesting the value the server
just passed over . . . . hence you can't change anything via the client
. . .</font>
<br>
<br><font size=2 color=red face="Arial">This of course meant if you were
connecting to several FreeNX servers at the same time, you might find that
you got the same number from more that one of them, which the client can't
accept,</font>
<br><font size=2 color=red face="Arial">which was the subject of the 2013
forum message you mention, referring to the work-around advisory from back
in 2008, applicable to simultaneous multiple FreeNX sever connections</font>
<br>
<br>
<br><font size=2 color=red face="Arial">Good luck anyway</font>
<br>
<br><font size=2 color=red face="Arial">cb</font>
<br>
<br>
<br>