SEARCH
TOOLBOX
LANGUAGES
Forum Menu

Solved: ECCE using non-standard ssh ports -- port redirection.

From NWChem

You are viewing a single post from the thread title above
Jump to: navigation, search

Click here for full thread
Gets Around
Threads 8
Posts 47
xterm channel issue
Hi Gary,
I've grepped my way through all the files and no sign of any [Cc]hannel anywhere. I think that might be hard-coded since it goes away if you specify xterm in the remote_shells.site file.

At the beginning of these examples I'm using
ssh_p9999: ssh -XC -p 9999|scp -P 9999


In terms of diagnostics, here's a successful xterm opening (node on my LAN, port 22):
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On
CMDSTAT=0
echo $PATH; echo CMDSTAT=$status
/usr/bin/perl:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
CMDSTAT=0
+go+if (-x /usr/bin/perl/xterm) echo TRUE
+go+if (-x /bin/xterm) echo TRUE
+go+if (-x /usr/sbin/xterm) echo TRUE
+go+if (-x /sbin/xterm) echo TRUE
+go+if (-x /usr/X11R6/bin/xterm) echo TRUE
+go+if (-x /usr/bin/X11/xterm) echo TRUE
TRUE
+go+exit; echo GOODBYE
GOODBYE
+go+exit


and here's a (new) unsuccessful one of the same section (there's definitely a time-out issue going on from the freeze/delay when hitting 'Open'):
DPMS (Energy Star):
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
  Monitor is On
CMDSTAT=0
+go+echo $PATH; echo CMDSTAT=$status
/usr/bin/perl:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
CMDSTAT=0
+go+if (-x  channel 1/xterm) echo TRUE
if: Expression Syntax.
+go+if (-x  free/xterm) echo TRUE
+go+if (-x  x11, nchannels 2
/usr/bin/perl/xterm) echo TRUE
+go+Too many ('s.
+go+Too many )'s.


I know: it doesn't help that it's a bit different from what it was before. The Too many ('s looks like a smoking gun. But we can get rid of that too by chucking xterm at the end of the shell definition line (whether I use /usr/bin/X11/xterm or just xterm doesn't matter)

Anyway, both systems are debian, both systems have /usr/bin/X11/xterm

So, I changed to
ssh_p9999: ssh -XC -p 9999| scp -P 9999| /usr/bin/X11/xterm

which got me
/usr/bin/X11/xterm: No absolute path found for shell: andy
Failed to open remote shell on localhost (incorrect password?)


More info from the unsuccessful run:
Remote shell command:
arg 0: /usr/bin/X11/xterm
arg 1: -l
arg 2: andy
arg 3: localhost
arg 4: echo
arg 5: +hi+
arg 6: &&
arg 7: csh
arg 8: -i
End remote shell command
/usr/bin/X11/xterm: No absolute path found for shell: andy


And therein lies a problem as
/usr/bin/X11/xterm -l andy localhost

gives
/usr/bin/X11/xterm: No absolute path found for shell: andy


Going back to a successful example there's no similar Remote shell command block. Instead
Running remote background command with args:
command (/usr/bin/X11/xterm -title "tantalum" -bg "#b7b8ba" -fg "#000000" -sb -e)
args (csh -c "cd ~ && $SHELL")
machine (tantalum)
remote shell (ssh)
user name (andy)
password is 0 characters
Running remote background command:
command (/usr/bin/X11/xterm -title "tantalum" -bg "#b7b8ba" -fg "#000000" -sb -e csh -c "cd ~ && $SHELL")


Basically, it seems like the way xterm is called in the unsuccessful case is malformed.

I think I'm a bit closer after actually reading the remote_shells.site file
#kerberos: rsh|rcp -r|rxterm -l ##user## -x ##-e command## ##machine##|kauth -h ##machine##

Looking at that, and rearranging (can't have -l user first)
ssh_p9999: ssh -p 9999| scp -P 9999|/usr/bin/X11/xterm -e csh -i -l andy oxygen 

gave this on trying to do 'tail -f'
Running remote command:
command (tail -f /home/andy/jobs/testing/coacac_II_lanl2dz/nwch.nwout)
machine (localhost)
remote shell (/usr/bin/X11/xterm -e csh -i -l andy oxygen)
local shell (csh)
user name (andy)
password is 0 characters
Creating remote shell:
machine (localhost)
remote shell (/usr/bin/X11/xterm -e csh -i -l andy oxygen)
local shell (csh)
user name (andy)
password is 0 characters
Remote shell command:
arg 0: /usr/bin/X11/xterm -e csh -i -l andy oxygen
arg 1: -l
arg 2: andy
arg 3: localhost
arg 4: echo
arg 5: +hi+
arg 6: &&
arg 7: csh
arg 8: -i
End remote shell command
Failed to open remote shell on localhost (incorrect password?)


(I think in theory the following should be enough:
/usr/bin/X11/xterm -e csh -i 

Finally, I've omitted the -x seen in the kerberos example since it's not recognised.)

While looking ugly, this actually works if executed in a shell on the remote node:
/usr/bin/X11/xterm -e csh -i-l andy oxygen -l andy localhost 

as does this
/usr/bin/X11/xterm -e csh -i-l andy oxygen -l andy localhost -c "echo +hi+ && csh -i"

It actually also works when executed on the ecce workstation, so it's not a matter of executing it in the wrong place.

I'm stumped.

The only other thing I could imagine is the 'remote shell (ssh_p999)' looking a bit funny in
Creating remote shell:
machine (localhost)
remote shell (ssh_p9999)
local shell (csh)
user name (andy)
password is 0 characters
Remote shell command:
arg 0: ssh
arg 1: -XC
arg 2: -p
arg 3: 9999
arg 4: -v
arg 5: -o
arg 6: ForwardX11=yes
arg 7: -l
arg 8: andy
arg 9: localhost
arg 10: echo
arg 11: +hi+
arg 12: &&
arg 13: csh
arg 14: -i
End remote shell command
OpenSSH_5.9p1 Debian-5, OpenSSL 1.0.1c 10 May 2012
Authenticated to localhost ([127.0.0.1]:9999).


But I really don't know. I'll update if I come up with a solution.
Edited On 7:48:35 PM PDT - Thu, May 31st 2012 by Ohlincha


Who's here now Members 0 Guests 0 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC