NX client connection problems

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Hey guys. I have NX Server running on a box with Ubuntu. It's been stable for a couple of months. Tonight I tried to connect and it failed. Looked in the log and saw that execution of a command to kill a login session had failed. It seems related to an attempt to resume my last session. The last time I was connected to it was prior to a loss of power during an ice storm recently, and during that connect I logged off and left the session active. So now afterward I guess it is trying to restore a session that isn't there. Anyone have an idea how I can get it to start a new one?

Here's the log, if it is of any interest:

HELLO NXSERVER - Version 3.1.0-2 - LFE
NX> 105 Hello NXCLIENT - Version 3.0.0
NX> 134 Accepted protocol: 3.0.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: mark
NX> 102 Password: **********
NX> 103 Welcome to: Mambazo user: mark
NX> 105 Listsession --user="mark" --status="suspended\054running" --geometry="1920x1200x32+render" --type="unix-gnome"
NX> 127 Available sessions:

Display Type Session ID Options Depth Screen Status Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------
1004 unix-gnome 97241F8C1D3A7F29C580FE3D39272E45 -RD--PSA 32 1920x1166 Suspended Mambazo

NX> 148 Server capacity: not reached for user: mark
NX> 105 Restoresession --link="lan" --backingstore="1" --cache="128M" --images="512M" --shmem="1" --shpix="1" --strict="0"
--composite="1" --media="0" --session="Mambazo" --type="unix-gnome" --geometry="1920x1166" --client="winnt"
--keyboard="pc102\057en_US" --id="97241F8C1D3A7F29C580FE3D39272E45" --resize="1"
NX> 596 NX> 596 ERROR: NXNODE Ver. 3.1.0-3 (Error id eA3FA17)
NX> 596 NX> 596 ERROR: resume session: run commands
NX> 596 NX> 596 ERROR: execution of last command failed
NX> 596 NX> 596 last command: /bin/bash --login -c 'kill -USR2 11753'
NX> 596 NX> 596 exit value: 1
NX> 596 NX> 596 stdout:
NX> 596 NX> 596 stderr: /bin/bash: line 0: kill: (11753) - No such process
NX> 596 NX> 596 init: stdin arguments: user=mark,userip=192%2e168%2e0%2e100,uniqueid=97241F8C1D3A7F29C580FE3D39272E45,
display=1004,images=512M,cache=128M,client=winnt,media=0,
backingstore=1,strict=0,clipboard=both,shpix=1,rootless=0,composite=1,session=Mambazo,shmem=1,type=unix-gnome,virtualdesktop=1,
resize=1,id=97241F8C1D3A7F29C580FE3D39272E45,keyboard=pc102%2fen_US,geometry=1920x1166,link=lan,render=1,
subscriptionid=None,productid=LFE,balance_host=192%2e168%2e0%2e105,balance_host_realip=192%2e168%2e0%2e105,encryption_mode=1,connection=local
NX> 280 Exiting on signal: 15
 

imported_synchro

Senior member
Nov 17, 2004
432
0
0
I tried NX and had issues all over the place - Then I found xrdp - works between linux & linux, windows & linux, and saves open sessions if you get cut off.
Check sourceforge for it. Good app to setup and use.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Thanks for the tip. I'm probably going to put Debian on this box instead of Ubuntu, for work reasons, so that will give me an opportunity to try that out. NX worked great for months, so it's kind of puzzling that it would stop. I'm sure the issue is the power failure between suspend and the resume attempt, but there ought to be a way to recover from that.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm sure the issue is the power failure between suspend and the resume attempt, but there ought to be a way to recover from that.

There probably is but you'll have to fight with NX to figure out where it's saved state because it's getting the pid 11753 from somewhere.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: Nothinman
I'm sure the issue is the power failure between suspend and the resume attempt, but there ought to be a way to recover from that.

There probably is but you'll have to fight with NX to figure out where it's saved state because it's getting the pid 11753 from somewhere.

Yeah, exactly. I've tried messing around with the usual locations. There is some stuff in the docs and settings tree that is definitely session related, but removing it had no effect as it was recreated each time. Nothing in the program files area, and nothing in the usual places in the registry. In the log it shows the client executing a list session command and getting back some session data from the server, although I didn't see a PID in there. So I guess I have to get a keyboard and hook it up to the monitor again. Have to do that anyway if I am putting Debian on it.
 

yurik

Junior Member
Mar 27, 2008
1
0
0
I had the same problem after the power outage also. Interesting that the help to nxserver says: "--cleanup: Terminates all running sessions. Useful after power-outage". But it didn't help. I had to uninstall all the packages (client, node, server) on the server side, remove the /usr/NX directory and install them all again. Also removed C:\Documents and Settings\username\.nx directory on the client (WinXP). I don't know if all the steps were necessary, but anyway it works again.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I finally stumbled on the solution to this one: I don't recall the exact command, but it is something like nxserver --history clear, run on the server.

This will clear the session history and the problem disappears.

I'm still using nx at home when I don't use the cli, and it's an amazing piece of coding. Unfortunately I can't use it on any systems at work because we're all about FHS, and nx violates the standard in a number of places. Needing write access to /usr is the one that was a deal breaker for us.
 

aronszajn

Junior Member
Aug 24, 2009
1
0
0
Just wanted to say I really appreciated this post; it solved my problem. I found it via Google and I joined AnandTech forums just so I could say thanks. By the way, the command is exactly what you said: 'nxserver --history clear' (as of 2009-08-24 anyway).

Thanks!
 

danzigrules

Golden Member
Apr 20, 2000
1,255
0
76
$ sudo /usr/NX/bin/nxserver --stop
$ sudo /usr/NX/bin/nxserver --start

That is how I used to fix that problem, but I like your solution more.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |