[FreeNX-kNX] nxagent session gets lost, user gets new session even though one already exists

Marcelo Boveto Shima marceloshima at gmail.com
Sat Jan 24 16:59:09 UTC 2009


Try to change on nxnode where:
                if stringinstring "Session: Display failure detected at"
"$line"
                then
                        echo "NX> 596 Error: Session $1 failed. Reason was:
$line"
                        if [ "$1" = "restore" ]
                        then
                                kill $NODE_TAIL_PID
                                break
                        fi
                fi

to:
                if stringinstring "Session: Display failure detected at"
"$line"
                then
                        echo "NX> 596 Error: Session $1 failed. Reason was:
$line"
                        if [ "$NODE_SUSPEND_STATUS" != "Suspending" ]
                        then
                                if [ "$1" = "restore" ]
                                then
                                        kill $NODE_TAIL_PID
                                        break
                                fi
                        fi
                fi


On Sat, Jan 24, 2009 at 3:20 AM, Mario Becroft <mb at gem.win.co.nz> wrote:

> Here is some more info. I think someone who understands how the
> nxserver/nxnode interaction is supposed to function can figure out the
> problem from the following debug output. I found that part of the reason
> for the confusing nxnode output is because there are in fact two
> nxnode's running. You can distinguish between them in the debug output
> below by looking at the pid. The one that emits the "1001 Bye" with no
> delimiter is the one invoked with "--slave". The other one was invoked
> with "--startsession".
>
> The NNNN lines are emitted by nxnode, and trace when it is starts, stops
> and emits messages about the session state.
>
> The other lines are from nxserver. They have my added instrumentation at
> the beginning of the line showing the process name, pid and time. The
> ones with AAAA are my additional instrumentation. The "AAAA cmd=..."
> line prints all commands received by the loop inside
> server_nxnode_start_wait(). It is interesting to note that in the
> failure case, it never sees the "suspending" and "suspended" messages.
>
> The main difference is that when the failure occurs,
> server_nxnode_start_wait() reads EOF and the session gets closed. The
> message "AAAA method is su, done nxnode_login" is where nxnode_login
> invoking su has returned inside server_nxnode_start. When you suspend
> the session correctly, this does not happen.
>
> Please help! I will be doing more work on this tomorrow.
>
> Output when suspending the session in the proper way, so that there is
> no fault:
>
> --8<---------------cut here---------------start------------->8---
> NNNN(/usr/NX/bin/nxnode)(12567)(Sat Jan 24 18:07:30 NZDT 2009) saying that
> session status is suspending
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:30 NZDT 2009) nxnode_reader:
> NX> 1009 Session status: suspending
> NX> 1009 Session status: suspending
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:30 NZDT 2009) AAAA cmd=(NX>
> 1009 Session status: suspending)
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:30 NZDT 2009) session_status
> 89E5FFF02E9C82347C7085AD85DF24DC Suspending
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:30 NZDT 2009)
> server_nxnode_echo: NX> 1009 Session status: suspending
> NNNN(/usr/NX/bin/nxnode)(12567)(Sat Jan 24 18:07:31 NZDT 2009) saying that
> session status is suspended
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009) Info: Closing
> connection to slave with pid 12188.
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009) nxnode_reader:
> NX> 1005 Session status: suspended
> NX> 1005 Session status: suspended
> NNNN(/usr/NX/bin/nxnode)(12200)(Sat Jan 24 18:07:31 NZDT 2009) stopping,
> delim is ()
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009) AAAA cmd=(NX>
> 1005 Session status: suspended)
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009) nxnode_reader:
> 1001 Bye.
> 1001 Bye.
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009)
> session_suspend 89E5FFF02E9C82347C7085AD85DF24DC
> (/usr/NX/bin/nxserver)(12050)(Sat Jan 24 18:07:31 NZDT 2009)
> server_nxnode_echo: NX> 1005 Session status: suspended
> --8<---------------cut here---------------end--------------->8---
>
> Output when killing nxssh on the client, resulting in nxagent
> automatically suspending the session, but causing the fault condition:
>
> --8<---------------cut here---------------start------------->8---
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) Info: Closing
> connection to slave with pid 10009.
> NNNN(/usr/NX/bin/nxnode)(10021)(Sat Jan 24 17:43:48 NZDT 2009) stopping,
> delim is ()
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) nxnode_reader:
> 1001 Bye.
> 1001 Bye.
> NNNN(/usr/NX/bin/nxnode)(10416)(Sat Jan 24 17:43:48 NZDT 2009) saying that
> session status is suspending
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) AAAA cmd=(1001
> Bye.)
> NNNN(/usr/NX/bin/nxnode)(10416)(Sat Jan 24 17:43:48 NZDT 2009) saying that
> session status is suspended
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) nxnode_reader:
> NX> 596 Error: Session  failed. Reason was: Session: Display failure
> detected at 'Sat Jan 24 17:43:48 2009'.
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) nxnode_reader:
> NX> 1009 Session status: suspending
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) AAAA method is
> su, done nxnode_login
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) AAAA end of
> server_nxnode_start
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) AAAA
> server_nxnode_start_wait about to close session
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) AAAA
> nxnode_login_stop_slave call 3
> (/usr/NX/bin/nxserver)(9867)(Sat Jan 24 17:43:48 NZDT 2009) Info: Closing
> connection to slave with pid 10009.
> --8<---------------cut here---------------end--------------->8---
>
> --
> Mario Becroft <mb at gem.win.co.nz>
> ________________________________________________________________
>     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/20090124/f8dbd4aa/attachment.html>


More information about the FreeNX-kNX mailing list