SSH: Invalid argument

123 views
Skip to first unread message

John T Mills

unread,
Dec 4, 2012, 2:39:10 PM12/4/12
to pdsh-...@googlegroups.com

I'm working an odd issue on pdsh.  Using exec with "ssh -x -l %u %h" should be identical to -R ssh, but exec succeeds and ssh fails.

Version:
pdsh-2.26
./configure --exec-prefix=/admin/pdsh --prefix=/admin/pdsh --libdir=/admin/pdsh --with-ssh --with-ssh-connect-timeout-option=30 --with-machines=/admin/txt --with-nodeupdown --without-rsh --with-dshgroups=/admin/txt/dsh --with-rcmd-rank-list=ssh,mrsh,rsh,krb4,qsh,mqsh,exec,xcpu
make
make install

Compile:

root@kplunix04:~
# ./pdsh -R exec -w archie,jughead ssh -x -l %u %h date
archie: Tue Dec  4 13:24:03 CST 2012
jughead: Tue Dec  4 13:24:03 CST 2012

root@kplunix04:~
# ./pdsh -R ssh -w archie,jughead date
archie: ssh: connect to host 30 port 22: Invalid argument
jughead: ssh: connect to host 30 port 22: Invalid argument

Thanks,

John

Mark Grondona

unread,
Dec 4, 2012, 4:06:07 PM12/4/12
to pdsh-...@googlegroups.com
Somehow your hosts are getting replaced with the string "30", probably
before pdsh execs
ssh. What is the output of

pdsh -V

and do you happen to have any PDSH_* or DSH_* environment variables set?

It also might be interesting to run strings(1) on the sshcmd.so lib.
That file should be in
src/modules/.libs/ if you've built in the local dir.

Also, I apologize for this but the pdsh googlegroups isn't quite
"official" yet, so it may be better if you open an Issue in the
googlecode issue tracker. (Or I can do it if you don't want to)
mark

John T Mills

unread,
Dec 4, 2012, 4:19:21 PM12/4/12
to pdsh-...@googlegroups.com

# /admin/pdsh/bin/pdsh -V
pdsh-2.26
rcmd modules: ssh,exec (default: ssh)
misc modules: machines,dshgroup

Mark Grondona

unread,
Dec 4, 2012, 4:26:39 PM12/4/12
to pdsh-...@googlegroups.com
Thanks. How about

/usr/bin/env | grep DSH

also if you can find the sshcmd.so file, can you run /usr/bin/strings on it?
Possibly near the bottom should be the built in "exec" cmd string.

mark

On 12/4/12, John T Mills <john.tho...@gmail.com> wrote:
>
> # /admin/pdsh/bin/pdsh -V
> pdsh-2.26
> rcmd modules: ssh,exec (default: ssh)
> misc modules: machines,dshgroup
>
>
> On Tuesday, December 4, 2012 3:06:07 PM UTC-6, Mark Grondona wrote:
>>
>> Somehow your hosts are getting replaced with the string "30", probably
>> before pdsh execs
>> ssh. What is the output of
>>
>> pdsh -V
>>
>> and do you happen to have any PDSH_* or DSH_* environment variables set?
>>
>> It also might be interesting to run strings(1) on the sshcmd.so lib.
>> That file should be in
>> src/modules/.libs/ if you've built in the local dir.
>>
>> Also, I apologize for this but the pdsh googlegroups isn't quite
>> "official" yet, so it may be better if you open an Issue in the
>> googlecode issue tracker. (Or I can do it if you don't want to)
>> mark
>>

John T Mills

unread,
Dec 4, 2012, 4:43:25 PM12/4/12
to pdsh-...@googlegroups.com
#  /usr/bin/env | grep DSH
#

# strings /admin/pdsh/pdsh/sshcmd.so
__gmon_start__
__cxa_finalize
_Jv_RegisterClasses
pipecmd_wait
pipecmd_destroy
pipecmd_target
pdsh_remote_argv
pdsh_personality
list_count
Malloc
memset
list_iterator_create
Strdup
list_next
list_iterator_destroy
pipecmd
pipecmd_stderrfd
Free
pipecmd_stdoutfd
pipecmd_signal
geteuid
rcmd_opt_set
getuid
setuid
errx
strstr
list_destroy
getenv
xstrcatchar
xstrcat
list_split
list_append
snprintf
list_prepend
list_iterator_reset
list_find
list_insert
pdsh_module_priority
pdsh_module_info
libpthread.so.0
libc.so.6
sshcmd.so
GLIBC_2.2.5
ATSubH
ffff.
AWAVAUATI
l$ I
=D      
t+HcD$
l$8H
l$8I
H[]A\A]A^A_
|$ I
t$ M
t$ 1
AWAVAUATUH
t$XH
[]A\A]A^A_
%p: %S: wait on ssh cmd: %m
sending SIGTERM to ssh %s
PDSH_SSH_ARGS_APPEND
PDSH_SSH_ARGS
-2 -a -x -l%u %h
-l%u
rcmd
ssh based rcmd connect method
%p: sshcmd_init: rcmd_opt_set: %m
Jim Garlick <xxxxxx at llnl dot gov>

Mark Grondona

unread,
Dec 4, 2012, 5:39:51 PM12/4/12
to pdsh-...@googlegroups.com
Ah, I see the problem now. In your ./configure line:

--with-ssh-connect-timeout-option=30

I think you probably meant

--connect-timeout=30

If you want to change the default connect timeout option for ssh, it
should be the full
option for your ssh program where '%d' will be substituted with the
default or configured
connect timeout, e.g.

--with-ssh-connect-timeout-option=-oConnectTimeout=%d

(That is the default and probably what you want in this case)


On 12/4/12, John T Mills <john.tho...@gmail.com> wrote:
> # /usr/bin/env | grep DSH

John T Mills

unread,
Dec 5, 2012, 8:34:05 AM12/5/12
to pdsh-...@googlegroups.com
Yeah that worked perfectly.  Thanks Mark!
Reply all
Reply to author
Forward
0 new messages