anuml / neatx

Automatically exported from code.google.com/p/neatx
0 stars 0 forks source link

connect times out #42

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Says 'connecting' but just times out
2. Seems to occur under high load ave (but not really that high)
3. ssh to the machine works fine, seems very responsive

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
an 26 13:21:42 nbecker6 nxserver-login[29818]: INFO nxserver_login:253 
Trying login for user 'nbecker' usi\
ng auth method 'su'
Jan 26 13:21:42 nbecker6 nxserver[29848]: INFO nxserver:689 Starting 
nxserver for user nbecker
Jan 26 13:21:45 nbecker6 nxserver[29848]: INFO nxserver:515 Restoring 
session '93D49F7C6D40B9A790C647F8FF04\
7F95'
Jan 26 13:21:45 nbecker6 nxserver[29848]: INFO nxserver:524 Found session 
'93D49F7C6D40B9A790C647F8FF047F95\
' in session database
Jan 26 13:21:45 nbecker6 nxserver[29848]: INFO node:514 Connecting to 
'/var/lib/neatx/sessions/93D49F7C6D40\
B9A790C647F8FF047F95/nxnode.sock'
Jan 26 13:21:45 nbecker6 nxnode[2154]: INFO nxnode:266 Connection 
established
Jan 26 13:21:45 nbecker6 nxnode[2154]: INFO nxnode:81 Received request: 
'restore', {'session': 'nbecker6', \
'strict': '0', 'composite': '1', 'encryption': '1', 'cache': '16M', 
'shpix': '1', 'geometry': '1680x1022', \
'client': 'linux', 'link': 'adsl', 'shmem': '1', 'media': '0', 'images': 
'64M', 'keyboard': 'pc102/us', 'ty\
pe': 'unix-kde', 'id': '93D49F7C6D40B9A790C647F8FF047F95', 'backingstore': 
'1'}
Jan 26 13:21:45 nbecker6 nxserver[29848]: INFO nxserver:594 Waiting for 
session '93D49F7C6D40B9A790C647F8FF\
047F95' to achieve waiting status
Jan 26 13:22:46 nbecker6 nxserver[29848]: ERROR nxserver:600 Session 
93D49F7C6D40B9A790C647F8FF047F95 has n\
ot achieved waiting status within 60 seconds

Original issue reported on code.google.com by ndbeck...@gmail.com on 26 Jan 2010 at 6:24

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have the same problem on Fedora 13, x86_64, with neatx-0.1-1.fc13.x86_64, nx-
3.3.0-38.fc12.x86_64.

--

Jan 27 00:29:48 transcendence nxserver-login[19837]: INFO nxserver_login:253 
Trying 
login for user 'luke' using auth method 'su'
Jan 27 00:29:49 transcendence nxserver[19870]: INFO nxserver:689 Starting 
nxserver 
for 
user luke
Jan 27 00:29:51 transcendence nxserver[19870]: INFO nxserver:515 Restoring 
session 
'7B1DE2A7A22F8C8B000C08C2F2740C23'
Jan 27 00:29:51 transcendence nxserver[19870]: INFO nxserver:524 Found session 
'7B1DE2A7A22F8C8B000C08C2F2740C23' in session database
Jan 27 00:29:51 transcendence nxserver[19870]: INFO node:514 Connecting to 
'/var/lib/neatx/sessions/7B1DE2A7A22F8C8B000C08C2F2740C23/nxnode.sock'
Jan 27 00:29:51 transcendence nxnode[18031]: INFO nxnode:266 Connection 
established
Jan 27 00:29:51 transcendence nxnode[18031]: INFO nxnode:81 Received request: 
'restore', {'session': 'transcendence', 'application': 
'/etc/X11/xinit/Xsession%20gnome-
session', 'composite': '1', 'encryption': '1', 'cache': '16M', 'geometry': 
'1935x2000', 
'shpix': '1', 'virtualdesktop': '1', 'strict': '0', 'client': 'linux', 'link': 
'wan', 
'shmem': '1', 'media': '0', 'images': '64M', 'keyboard': 'pc102/us', 'type': 
'unix-
application', 'id': '7B1DE2A7A22F8C8B000C08C2F2740C23', 'backingstore': '1'}
Jan 27 00:29:51 transcendence nxserver[19870]: INFO nxserver:594 Waiting for 
session 
'7B1DE2A7A22F8C8B000C08C2F2740C23' to achieve waiting status
Jan 27 00:30:51 transcendence nxserver[19870]: ERROR nxserver:600 Session 
7B1DE2A7A22F8C8B000C08C2F2740C23 has not achieved waiting status within 60 
seconds
Jan 27 00:30:51 transcendence nxserver-login[19837]: INFO auth:142 Waiting for 
authenticated program to finish

--

In the file /var/lib/neatx/sessions/*/*/clients, I get:

  error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy

Is it the nx libraries that is trying to look stuff up in the old /usr/X11R6 
path, 
or 
neatx?  (That path definitely doesn't exist... lib should be lib64 on my arch, 
but 
/usr/X11R6 went away a long time ago.)  Is this error even a problem?

I get the following upon remote connect (I started a session locally earlier 
when I 
was 
at work, now I can't connect to it; I have tried shadowing as well as setting 
up a 
new 
session).

Original comment by luke.hutch on 27 Jan 2010 at 5:38

GoogleCodeExporter commented 8 years ago
In my case it is definitely intermittent, so could not be due to e.g. some path 
being 
wrong. 

Original comment by ndbeck...@gmail.com on 27 Jan 2010 at 12:09

GoogleCodeExporter commented 8 years ago
Yeah, I'm not actually sure if the path thing is even causing this issue, I 
just 
listed it here because I found the error in one of the logs.

After rebooting both client and server, I'm getting the following error.  I 
didn't 
get this before trying to open a local session.  Will try another local session 
later when I'm at the other computer.

--

NX> 203 NXSSH running with pid: 2641
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 128.30.48.28 on port: 42022
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.3.0 - GPL
NX> 105 Hello nxclient - version 3.3.0
NX> 134 Accepted protocol: 3.3.0
NX> 105 Set SHELL_MODE: SHELL
NX> 105 Set AUTH_MODE: PASSWORD
NX> 105 Login
NX> 101 User: luke
NX> 102 Password: **********
NX> 103 Welcome to: tr.csail.mit.edu user: luke
NX> 105 Listsession --user="luke" --status="suspended,running" --
geometry="1935x2000x24+render" --type="unix-application"
NX> 127 Session list of user 'luke':
Display Type             Session ID                       Options  Depth Screen 

Status      Session Name
------- ---------------- -------------------------------- -------- ----- ---
----------- ----------- ------------------------------
429     unix-application 7B1...C23 -RD--PSA    24 1935x2000      Suspended   tr

NX> 148 Server capacity: not reached for user: luke
NX> 105 Restoresession  --virtualdesktop="1" --
application="/etc/x11/xinit/xsession%20gnome-session" --link="wan" --
backingstore="1" --encryption="1" --cache="16m" --images="64m" --shmem="1" --
shpix="1" --strict="0" --composite="1" --media="0" --session="tr" --type="unix-
application" --geometry="1935x2000" --client="linux" --keyboard="pc102/us" --
id="7b1...c23" --virtualdesktop="1"
NX> 500 Internal error
NX> 999 Bye.
NX> 280 Exiting on signal: 15

Original comment by luke.hutch on 27 Jan 2010 at 4:44

GoogleCodeExporter commented 8 years ago
Does it repeatedly fail to resume the existing session? Once it fails, does it 
ever 
work again?

Original comment by kormat on 9 Feb 2010 at 9:19

GoogleCodeExporter commented 8 years ago
Once my session died, I couldn't get it to restart at all -- got the following 
error messages.  Deleting the old sessions that were sitting around was the 
only way to fix this and allow 
connections to the machine again, as described in Issue 34 comment 6 point 2.

2010-02-21T01:41:57.327662-05:00 transcendence nxserver[2181]: DEBUG 
protocol:172 >>> 'Restoresession  --virtualdesktop="1" 
--application="/etc/x11/xinit/xses
sion%20gnome-session" --link="wan" --backingstore="1" --encryption="1" 
--cache="16m" --images="64m" --shmem="1" --shpix="1" --strict="0" 
--composite="1" --med
ia="0" --session="transcendence" --type="unix-application" 
--geometry="1935x2000" --client="linux" --keyboard="pc102/us" 
--id="7b1de2a7a22f8c8b000c08c2f2740c2
3" --virtualdesktop="1"\n'
2010-02-21T01:41:57.328227-05:00 transcendence nxserver[2181]: INFO 
nxserver:515 Restoring session '7B1DE2A7A22F8C8B000C08C2F2740C23'
2010-02-21T01:41:57.328530-05:00 transcendence nxserver[2181]: DEBUG 
session:248 Loading session 7B1DE2A7A22F8C8B000C08C2F2740C23 from 
/var/lib/neatx/sessions
/7B1DE2A7A22F8C8B000C08C2F2740C23/neatx.data
2010-02-21T01:41:57.329547-05:00 transcendence nxserver[2181]: INFO 
nxserver:524 Found session '7B1DE2A7A22F8C8B000C08C2F2740C23' in session 
database
2010-02-21T01:41:57.329945-05:00 transcendence nxserver[2181]: DEBUG 
nxserver:645 Connecting to nxnode
2010-02-21T01:41:57.330315-05:00 transcendence nxserver[2181]: INFO node:514 
Connecting to 
'/var/lib/neatx/sessions/7B1DE2A7A22F8C8B000C08C2F2740C23/nxnode.so
ck'
2010-02-21T01:41:57.333783-05:00 transcendence nxserver[2181]: ERROR 
protocol:165 Error while handling line 'restoresession  --virtualdesktop="1" 
--applicatio
n="/etc/X11/xinit/Xsession%20gnome-session" --link="wan" --backingstore="1" 
--encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" 
--strict="0"
 --composite="1" --media="0" --session="transcendence" --type="unix-application" --geometry="1935x2000" --client="linux" --keyboard="pc102/us" --id="7B1DE2A7A
22F8C8B000C08C2F2740C23" --virtualdesktop="1"'
2010-02-21T01:41:57.333855-05:00 transcendence nxserver[2181]: Traceback (most 
recent call last):
2010-02-21T01:41:57.333908-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/protocol.py", line 161, in _HandleLine
2010-02-21T01:41:57.333959-05:00 transcendence nxserver[2181]:     
self._handler(line)
2010-02-21T01:41:57.334003-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/app/nxserver.py", line 209, in __call__
2010-02-21T01:41:57.334056-05:00 transcendence nxserver[2181]:     return 
self._RestoreSession(args)
2010-02-21T01:41:57.334100-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/app/nxserver.py", line 527, in 
_RestoreSession
2010-02-21T01:41:57.334146-05:00 transcendence nxserver[2181]:     nodeclient = 
self._GetNodeClient(sessid, False)
2010-02-21T01:41:57.334199-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/app/nxserver.py", line 646, in 
_GetNodeClient
2010-02-21T01:41:57.334247-05:00 transcendence nxserver[2181]:     
nodeclient.Connect(retry)
2010-02-21T01:41:57.334291-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/node.py", line 528, in Connect
2010-02-21T01:41:57.334334-05:00 transcendence nxserver[2181]:     
self._InnerConnect(sock, False)
2010-02-21T01:41:57.334377-05:00 transcendence nxserver[2181]:   File 
"/usr/lib/python2.6/site-packages/neatx/node.py", line 493, in _InnerConnect
2010-02-21T01:41:57.334449-05:00 transcendence nxserver[2181]:     
sock.connect(self._address)
2010-02-21T01:41:57.334496-05:00 transcendence nxserver[2181]:   File 
"<string>", line 1, in connect
2010-02-21T01:41:57.334537-05:00 transcendence nxserver[2181]: error: [Errno 
111] Connection refused
2010-02-21T01:41:57.334794-05:00 transcendence nxserver[2181]: DEBUG 
protocol:172 >>> 'NX> 500 Internal error\n'
2010-02-21T01:41:57.335191-05:00 transcendence nxserver[2181]: DEBUG 
protocol:172 >>> 'NX> 999 Bye.\n'

Original comment by luke.hutch on 21 Feb 2010 at 6:49

GoogleCodeExporter commented 8 years ago
@luke.hutch Your last entry is almost certainly a stale session issue, which is 
different to the earlier timeout issue.

This smells like a race condition to me. I haven't been able to reproduce it 
yet 
though.

Original comment by kormat on 5 Mar 2010 at 1:01

GoogleCodeExporter commented 8 years ago
getting something similar here
currently running under Gentoo, and I've recently updated to the most recent 
trunk
release, just to confirm this hasn't already been fixed

basically if I establish a session from a Linux client or Windows client 
(nomachine
client) to a Linux box (neatx)
Then disconnect the session without terminating it (suspend)
This leaves the session in an odd state that will never resume (but kde / apps
running in the session are still present according to ps -A)

I see a session directory under /var/lib/neatx/sessions/
but nxserver --list, lists no sessions
(nxkill --list on the client does still list the session however)
typically rebooting the server then clearing out the /var/lib/neatx/sessions/
directory for stale session directories seems to be the way to go
but the --cleanup option for nxserver won't clear out the sessions directory by
itself (not sure if it's supposed to) as nothing as listed under --list

same for both KDE / Gnome

Original comment by garlicbr...@googlemail.com on 8 Mar 2010 at 12:52

GoogleCodeExporter commented 8 years ago
@garlicbready: it sounds like you have multiple NX installs - neatx's nxserver 
doesn't take --list or --cleanup parameters:

diamond@fedora10:~(0:127)$ /usr/lib/neatx/nxserver --help
Usage
=====
  nxserver [options]

Options
=======
--debug, -d    Enable debug logging
--logtostderr  Log to stderr
--proto=PROTO  
--help, -h     show this help message and exit

It's also not intended to be run manually.

Original comment by kormat on 8 Mar 2010 at 8:17

GoogleCodeExporter commented 8 years ago
Hi Kormat
sorry you were right about the install, I had another nx server installed (now
removed / then re-installed neatx to be sure)
I'm not a gentoo dev but for info I've recently submitted a more up to date 
ebuild to
bugzilla on the gentoo site for the r59 release
(also added in a blocker to prevent install of other nx servers during install)

for the above bug I'm still noticing something similar
now sometimes the session resumes other times it times out the client side same 
as above

looking at "ps -A | grep nx"
it looks like when the resume works there's only one instance of nxagent running
but when the resume is broken, there's 2 instances of nxagent running on the 
server

running "killall nxagent" on the box seems to reset things back to normal 
without a
reboot
I'm guessing that a second instance of nxagent is being run instead of resuming 
/
re-connecting to the already running first instance
when attempting to re-establish a connection from the client to a suspended 
session
(currently using nomachine windows client v3.4.0-5)

log attached for info

Original comment by garlicbr...@googlemail.com on 9 Mar 2010 at 11:00

Attachments:

GoogleCodeExporter commented 8 years ago
I've seen the same connection timeout issue when resuming an existing session 
using the 
NoMachine nxclient (3.3.0-6) for Windows, connecting to neatx (neatx-
server_0.3.1+svn59-0~ppa1~lucid1_amd64). I noticed that whenever this happens, 
an extra 
nxssh.exe process is running on the Windows machine -- apparently from a prior 
connection to the session. Killing that process allows me to resume the 
existing 
session.

Original comment by pstel...@gmail.com on 19 May 2010 at 8:39

GoogleCodeExporter commented 8 years ago
I can confirm that the nxclient for windows leaves nxssh.exe open after 
disconnecting from neatx. It kills the session if I try to resume without 
manually killing the nxssh.exe process first.

Original comment by obr...@gmail.com on 13 Apr 2012 at 12:49