[FreeNX-kNX] nxtunnel-0.2 not working (but finding xauth now)

Kurt Pfeifle k1pfeifle at gmx.net
Sat Sep 18 19:21:03 UTC 2004


Neal, 

here are some more test results. I used Knoppix V 3.6 as my
local workstatation, connecting through the internet to a
"remotenx" host.
 
* nxtunnel doesnt honor the "-p PORT" parameter. 
* nxagent (at the remote end) tries to create a directory 
  "/home/knoppix/.nx/C-<display-number>" (of which the 
  parents are not there)


===================================
-p PORT parameter (session outputs)
===================================
The tests were run via a port forwarding computer, IP 10.160.50.3, 
which works perfektly well with the NoMachine NX Client or plain ssh
in its portforwarding tasks.

------------ no debug output (start) --------------------------------------
knoppix at ttyp2[bin]$ sh nxtunnel-0.2 -p 10222 kurt at 10.160.50.3 xterm
Bad port '"10222"'
nxproxy:
nxproxy: NXPROXY - Version 1.3.2
nxproxy:
nxproxy: Copyright (C) 2001,2003 NoMachine.
nxproxy: See http://www.nomachine.com/ for more information.
nxproxy:
knoppix at ttyp2[bin]$
------------ no debug output (end) --------------------------------------



------------ -vv debug output (start) --------------------------------------
knoppix at ttyp2[bin]$ sh nxtunnel-0.2 -vv -p 10222 kurt at 10.160.50.3 xterm
local debug1: Running NX display on localhost:29
local debug2: Creating directories for log files.
local debug1: Checking for xauth.
local debug1: Found /usr/X11R6/bin/xauth.
local debug1: Determining xauth cookie for :0.
local debug2: xauth token for :0 is 943ace7908023b69b5357fe5d16ac61c
local debug1: Adding cookie "943ace7908023b69b5357fe5d16ac61c" for localnx/unix:29
local debug1: Adding cookie "943ace7908023b69b5357fe5d16ac61c" for localnx:29
local debug1: Checking for nc.
local debug1: Found /bin/nc.
local debug1: Checking if sed supports --unbuffered
local debug1: sed seems to support --unbuffered
local debug1: Checking if grep supports --line-buffered
local debug1: grep seems to support --line-buffered
local debug1: Checking for faucet.
local debug1: Found /usr/bin/faucet.
local debug1: Checking for nxproxy.
local debug1: Found /usr/bin/nxproxy.
local debug1: Starting faucet to listen on port 6029 for an X connection.
local debug1: Starting nxproxy on localhost:29.
Bad port '"10222"'
nxproxy:
nxproxy: NXPROXY - Version 1.3.2
nxproxy:
nxproxy: Copyright (C) 2001,2003 NoMachine.
nxproxy: See http://www.nomachine.com/ for more information.
nxproxy:
nxproxy: Info: Proxy running in client mode with pid '22718'.
nxproxy: Info: Waiting for connection from any host on port '4029'.
knoppix at ttyp2[bin]$
------------ -vv debug output (end) --------------------------------------


------------ but it works for ssh (start) --------------------------------------
knoppix at ttyp2[bin]$ ssh -p 10222 kurt at 10.160.50.3 pwd
The authenticity of host '10.160.50.3 (10.160.50.3)' can't be established.
RSA key fingerprint is b4:fc:f0:a8:e0:6c:39:7c:f1:e2:f3:48:bc:fe:c6:1d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.160.50.3' (RSA) to the list of known hosts.
Password:
/home/kurt
------------ but it works for ssh (end) --------------------------------------


=================================================
nxagent at the remote end creates wrong directory
=================================================
The problem lies in NX_HOST_PORT_PARAMS where "root=$nx_root" is given...

knoppix at ttyp2[bin]$ whoami
knoppix

knoppix at ttyp2[bin]$ hostname
localnx

------------ no debug output --------------------------------------
knoppix at ttyp2[bin]$ sh nxtunnel-0.2 kurt at remotenx xterm
nxproxy:
nxproxy: NXPROXY - Version 1.3.2
nxproxy:
nxproxy: Copyright (C) 2001,2003 NoMachine.
nxproxy: See http://www.nomachine.com/ for more information.
nxproxy:
Password:
nxagent:
nxagent: NXAGENT - Version 1.4.0
nxagent:
nxagent: Copyright (C) 2001, 2004 NoMachine.
nxagent: See http://www.nomachine.com/ for more information.
nxagent:
nxagent: Loop: PANIC! Can't create directory '/home/knoppix/.nx/C-20. Error is 2 'No such file or directory'.
nxagent: Error: Can't create directory '/home/knoppix/.nx/C-20. Error is 2 'No such file or directory'.
nxagent: Loop: PANIC! Cannot determine directory of NX session file.
nxagent: Error: Cannot determine directory of NX session file.
nxagent:
nxagent: Fatal server error:
nxagent: NXAGENT: Fatal IO error on display "nx/nx,link=modem,cache=1024k,stream=9,pack=16m-png-jpeg-1,nodelay=1,accept=127.0.0.1,root=/home/knoppix/.nx,log=errors,stat=stats:20".
nxagent:
xterm Xt error: Can't open display: :20
Connection to remotenx closed.

nxproxy: Error: Remote NX proxy closed the connection.
nxproxy: Error: Please check your authorization credentials.

kurt at p15159004:~>                                                  
------------ no debug output (end) --------------------------------------

So despite me trying to give to nxtunnel my "remote credentials",
it somehow transmits my local username to the remote end too and
confuses nxagent.

After I created "/home/knoppix/.nx/" at the remote end manually,
nxtunnel started to work sometimes (in fact, it created a connection
more ofthen than not...). The failures were because of not discovering
a correct, free display in time.

Here is the debug output for completeness:

------------ -vv debug output (start) --------------------------------------
knoppix at ttyp2[bin]$ sh nxtunnel-0.2 -vv kurt at remotenx xterm
local debug1: Running NX display on localhost:17
local debug2: Creating directories for log files.
local debug1: Checking for xauth.
local debug1: Found /usr/X11R6/bin/xauth.
local debug1: Determining xauth cookie for :0.
local debug2: xauth token for :0 is 943ace7908023b69b5357fe5d16ac61c
local debug1: Adding cookie "943ace7908023b69b5357fe5d16ac61c" for localnx/unix:17
local debug1: Adding cookie "943ace7908023b69b5357fe5d16ac61c" for localnx:17
local debug1: Checking for nc.
local debug1: Found /bin/nc.
local debug1: Checking if sed supports --unbuffered
local debug1: sed seems to support --unbuffered
local debug1: Checking if grep supports --line-buffered
local debug1: grep seems to support --line-buffered
local debug1: Checking for faucet.
local debug1: Found /usr/bin/faucet.
local debug1: Checking for nxproxy.
local debug1: Found /usr/bin/nxproxy.
local debug1: Starting faucet to listen on port 6017 for an X connection.
local debug1: Starting nxproxy on localhost:17.
nxproxy:
nxproxy: NXPROXY - Version 1.3.2
nxproxy:
nxproxy: Copyright (C) 2001,2003 NoMachine.
nxproxy: See http://www.nomachine.com/ for more information.
nxproxy:
nxproxy: Info: Proxy running in client mode with pid '23240'.
nxproxy: Info: Waiting for connection from any host on port '4017'.
Password:
remote debug1: Running NX display on localhost:27
remote debug2: Creating directories for log files.
remote debug1: Checking for xauth.
remote debug1: Found /usr/bin/xauth.
remote debug1: Determining xauth cookie for localhost:10.0.
remote debug2: xauth token for localhost:10.0 is 99a4fb75232374102fd414203dcab08f
remote debug1: Adding cookie "99a4fb75232374102fd414203dcab08f" for p15159004/unix:27
remote debug1: Adding cookie "99a4fb75232374102fd414203dcab08f" for p15159004:27
remote debug1: Checking for nc.
remote debug1: Found /usr/bin/nc.
remote debug1: Checking if sed supports --unbuffered
remote debug1: sed seems to support --unbuffered
remote debug1: Checking if grep supports --line-buffered
remote debug1: grep seems to support --line-buffered
remote debug1: Checking for hose.
remote debug1: Found /usr/bin/hose.
remote debug1: Checking for nxagent.
remote debug1: Found /usr/bin/nxagent.
nxagent:
nxagent: NXAGENT - Version 1.4.0
nxagent:
nxagent: Copyright (C) 2001, 2004 NoMachine.
nxagent: See http://www.nomachine.com/ for more information.
nxagent:
nxagent: Info: Agent running with pid '13960'.
nxagent: Loop: PANIC! Can't create directory '/home/knoppix/.nx/C-27. Error is 2 'No such file or directory'.
nxagent: Error: Can't create directory '/home/knoppix/.nx/C-27. Error is 2 'No such file or directory'.
nxagent: Loop: PANIC! Cannot determine directory of NX session file.
nxagent: Error: Cannot determine directory of NX session file.
nxagent:
nxagent: Fatal server error:
nxagent: NXAGENT: Fatal IO error on display "nx/nx,link=modem,cache=1024k,stream=9,pack=16m-png-jpeg-1,nodelay=1,accept=127.0.0.1,root=/home/knoppix/.nx,log=errors,stat=stats:27".
nxagent:
local debug1: faucet received SWITCH signal from remote side.  Having nc listen on the control port (4017) of nxagent and route nxagent traffic to it via the faucet.
nxproxy: Info: Accepted connection from '127.0.0.1' on port '32933'.
nxproxy: Info: Connection with remote proxy established.

xterm Xt error: Can't open display: :27
Connection to remotenx closed.

nxproxy: Error: Remote NX proxy closed the connection.
nxproxy: Error: Please check your authorization credentials.

kurt at p15159004:~>                                                  
------------ -vv debug output (end) --------------------------------------



More information about the FreeNX-kNX mailing list