bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Parallel Bug Reports Unable to execute remote commands to server


From: Zhi Shen
Subject: Re: GNU Parallel Bug Reports Unable to execute remote commands to servers running SunOS
Date: Wed, 7 Aug 2013 16:09:21 -0400


On Wed, Aug 7, 2013 at 3:08 PM, Ole Tange <address@hidden> wrote:
On Wed, Aug 7, 2013 at 3:29 PM, Zhi Shen <address@hidden> wrote:

> After upgrading to "20130722" from "20130422", we are unable to execute
> remote commands to servers running SunOS.  Hope someone can help.

I have access to a SunOS 5.10:

$ uname -a
SunOS solaris 5.10 Generic_125100-08 sun4u sparc SUNW,Ultra-5_10

I have no problem when running from a GNU/Linux system to the SunOS
5.10 machine:

$ </dev/null ssh -tt  solaris  uptime
  7:40pm  up 100 day(s),  7:50,  3 users,  load average: 0.25, 0.26, 0.21

I have no problem when running from a GNU/Linux system to the SunOS
5.10 machine:

$ </dev/null ssh -tt  redhat  uptime
tcgetattr: No such device or address
 14:04:39 up 15 days, 14:18,  6 users,  load average: 0.17, 0.85, 0.74

(The tcgetattr error is a known situation, and GNU Parallel deals with that).

But I can reproduce the problem when running FROM the SunOS machine TO
a SunOS machine:

$ </dev/null ssh -tt  solaris  uptime
tcgetattr: No such device or address
Connection to solaris closed.

I reckon it is due to the version of ssh/ssh-server:

$ ssh -V
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x009070df

$ telnet solaris 22
Trying 192.168.10.8...
Connected to solaris.polarhome.com.
Escape character is '^]'.
SSH-2.0-Sun_SSH_1.1

The 'ssh -tt' is needed so that Ctrl-C is transferred to kill off the
command running remote.

Try this:

ps -edalf | grep [s]leep | wc -l # This should give 0
ssh -tt solaris sleep 1000 < /dev/null &
sleep 3;
ps -edalf | grep [s]leep | wc -l # This should give 2
kill $! # kill the ssh - This should kill the remote sleep
ps -edalf | grep [s]leep | wc -l # This should give 0

Now try without -tt:

ps -edalf | grep [s]leep | wc -l # This should give 0
ssh solaris sleep 1000 < /dev/null &
sleep 3;
ps -edalf | grep [s]leep | wc -l # This should give 2 - the sleep and the ssh
kill $! # kill the ssh - This should kill the remote sleep
ps -edalf | grep [s]leep | wc -l # This should give 0 - but it gives 1
because the sleep is not killed.

So the essence seems to be:

ssh -tt works fine from SunOS 5.10 to not-SunOS 5.10.
ssh -tt works fine from not-SunOS 5.10 to SunOS 5.10.
ssh -tt fails from SunOS 5.10 to SunOS 5.10.

So:

ssh -tt works fine from SunOS 5.10 XOR to SunOS 5.10.

The best option to fix this is to find a way to get the
Sun_SSH-server/client combo to work. I don't have a lot contacts in
the SunOS world, so I will be relying you to help me out here.

A less preferable option is to check if the client and server runs
Sun_SSH and if so revert to the old ssh-method that does not transfer
Ctrl-C. It is reasonably easy to see if the ssh-client is Sun_SSH (ssh
-V), the remote can probably be detected with ssh -v (debug1: Remote
protocol version 2.0, remote software version Sun_SSH_1.1).

Zhi Shen: can you help with the first option?


/Ole

Ole, I tried to reproduce your results but they are quite different.

redhat$ ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

redhat$ telnet solaris 22 
Trying 10.10.20.162...
Connected to solaris.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.6

redhat$ ./test.sh
0
tcgetattr: Inappropriate ioctl for device
1
Killed by signal 15.
0

0
stty: : Invalid argument
1
Killed by signal 15.
0

solaris$ ps -ef | grep [s]leep
     user 20744     1   0 16:03:20 ?           0:00 sleep 2000
 
redhat$ cat test.sh
#!/bin/bash

ps -edalf | grep [s]leep | wc -l # This should give 0
ssh -tt solaris sleep 1000 < /dev/null &
sleep 3;
ps -edalf | grep [s]leep | wc -l # This should give 2
kill $! # kill the ssh - This should kill the remote sleep
ps -edalf | grep [s]leep | wc -l # This should give 0

echo

ps -edalf | grep [s]leep | wc -l # This should give 0
ssh solaris sleep 2000 < /dev/null &
sleep 3;
ps -edalf | grep [s]leep | wc -l # This should give 2 - the sleep and the ssh
kill $! # kill the ssh - This should kill the remote sleep
ps -edalf | grep [s]leep | wc -l # This should give 0 - but it gives 1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]