[FreeNX-kNX] Port Assignment
chris at ccburton.com
chris at ccburton.com
Thu Mar 12 14:15:36 UTC 2015
John H <lmindnix at gmail.com> Sent by: "FreeNX-kNX"
<freenx-knx-bounces at kde.org> 11/03/2015 22:33 Please respond to User
Support for FreeNX Server and kNX Client <freenx-knx at kde.org>
Hey all. Having issues with TCP port binding on the server from client.
<SNIP>
Error: Call to bind failed for TCP port 35022. Error is 98 'Address
already in use'.
Error: Aborting session with 'Unable to open display
'nx/nx,options=/users/testuser/.nx/C-blade015-31022-B88B9BA2369A5DC1AB0AA53AA52EFC60/options:31022''.
I've seen this discussed in previous threads here:
http://marc.info/?l=freenx-knx&m=138442658819979&w=2
YUP
Checking port 35022 reveals that it's in use by LDAP, bound to a different
user on that NX server.
YUP - and of course something has to give somewhere
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.
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".
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.
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.
Sounds like you have the 6000 4000 bug in nxserver.
Can you see:-
# Check if there is already an agent running on
that display on that host
let AGENT_DISPLAY=$SESS_DISPLAY+6000
somewhere near line No. 1450 in
/usr/bin/nxserver
If you do, try setting
let AGENT_DISPLAY=$SESS_DISPLAY+4000
and see if that fixes it ( by skipping over any used ports)
Please let us know if it works before/after
so
Akemi can update it ( if he's still around and can be bothered )
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 !!!!
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.
NOTES
------------
The
DISPLAY_BASE=
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
"session display base"
from which various display/port values are calculated by adding a value
hard wired into the code
eg in original nxserver
SESS_DISPLAY=$DISPLAY_BASE # used for apps ie the session
env $DISPLAY
let PROXY_DISPLAY=$SESS_DISPLAY+4000 # the one you're (probably) having
problems with
let AGENT_DISPLAY=$SESS_DISPLAY+6000 # bug should be 4000
let SAMBA_DISPLAY=$SESS_DISPLAY+3000
let MEDIA_DISPLAY=$SESS_DISPLAY+7000
let CUPS_DISPLAY=$SESS_DISPLAY+9000 # bug should be 9090 see below
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
see in nxnode where it all actually happens
let ESPEAKER=$display+7000
let NXSAMBA_PORT=$display+3000
let NODE_CUPSD_PORT=$display+9090 # should be same as above
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
You might be safer going back to 2000 to keep away from anything else in
user-land
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
"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)
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 . . .
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,
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
Good luck anyway
cb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20150312/6f16da7b/attachment.html>
More information about the FreeNX-kNX
mailing list