[FreeNX-kNX] $SESS_DISPLAY in server_startrestore_session()
Marcelo Boveto Shima
marceloshima at gmail.com
Wed Dec 10 21:18:39 UTC 2008
I agree with jhonyl. I don't want to see the display number too high.
We should add the remaining tests to make sure the resources are free
and the nxagent will succeed.
There is one forgotten test before defining the display:
diff -urNad freenx-server-0.7.3+svn612~/nxserver
freenx-server-0.7.3+svn612/nxserver
--- freenx-server-0.7.3+svn612~/nxserver 2008-12-10
19:06:54.000000000 -0200
+++ freenx-server-0.7.3+svn612/nxserver 2008-12-10 19:06:55.000000000 -0200
@@ -1443,6 +1443,14 @@
continue
fi
+ let PROXY_DISPLAY=$SESS_DISPLAY+4000
+ if [ $COMMAND_NETCAT -z "$SERVER_HOST"
$PROXY_DISPLAY ]
+ then
+ log 2 "Warning: nxagent proxy without
.nX$SESS_DISPLAY-lock found on host:port $SERVER_HOST:$AGENT_DISPLAY."
+ let SESS_DISPLAY=$SESS_DISPLAY+1
+ continue
+ fi
+
# Now check for the other enabled services
let SAMBA_DISPLAY=$SESS_DISPLAY+3000
Regards,
Shima
On Wed, Dec 10, 2008 at 11:58 AM, jhonyl <jhonyl at netscape.net> wrote:
> I think that what you did is perfectly ok, but I think it would be
> better in the public algorithm, if the script will check if the session
> failed due to display and if so it will lock the display number for NX, and
> try again on the next free port. All this without failing the session, that
> is, it will try and try (up to max attempts) until it will be able to
> establish a session.
>
>
> -----Original Message-----
> From: Kai Lappalainen <nxlist at httgmbh.net>
> To: freenx-knx at kde.org
> Sent: Tue, 9 Dec 2008 10:32 pm
> Subject: [FreeNX-kNX] $SESS_DISPLAY in server_startrestore_session()
>
> Hello, recently we've had some trouble with FreeNX under load not beeing able to start a new session, because the "stupid but working algo..." (comment from nxserver script!) was not really working. ;-) The problem was, that nxserver (in server_startrestore_session()) always tried to use the same $SESS_DISPLAY, which was locked somehow(?) - eventhough no lock-files existed. The reason for the "lock" could not be found. There were no processes left running from the user who last successfully used this display number. If we forced FreeNX to use the next display by manually "blocking" this faulty display number (touch /tmp/.X<displaynum>-lock) people were able to login again using the next free (working) numbers. The commercial NXServer uses another logic here: It does not search for the next free display number (starting from display-base) but instead always increments the display number, starting again at display_base when reaching the limit (round-robin). It uses /usr/NX/var/db/running/display.{last} for storing the last used display number. I modified nxserver to mimic this behaviour and hope there will be no more troubles in the future. Maybe this should generally be implemented in FreeNX this way? Best regards, Kai Lappalainen -- ________________________________________________________________________ HOULDER TERRATRANS GMBH - Dorotheenstr. 82 - D-22301 Hamburg Commercial Register No.: Hamburg HRB 8674 - Management: Stefan W. Dircks ________________________________________________________________ Were you helped on this list with your FreeNX problem? Then please write up the solution in the FreeNX Wiki/FAQ: http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ Don't forget to check the
>
> NX Knowledge Base: http://www.nomachine.com/kb/ ________________________________________________________________ FreeNX-kNX mailing list --- FreeNX-kNX at kde.org https://mail.kde.org/mailman/listinfo/freenx-knx ________________________________________________________________
>
>
> ------------------------------
> Listen to 350+ music, sports, & news radio stations including songs for
> the holidays FREE while you browse. Start Listening Now<http://toolbar.aol.com/aolradio/download.html?ncid=emlweusdown00000013>!
>
>
> ________________________________________________________________
> Were you helped on this list with your FreeNX problem?
> Then please write up the solution in the FreeNX Wiki/FAQ:
>
> http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
>
> Don't forget to check the NX Knowledge Base:
> http://www.nomachine.com/kb/
>
> ________________________________________________________________
> FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
> https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20081210/5448156c/attachment.html>
More information about the FreeNX-kNX
mailing list