bug-parallel
[Top][All Lists]
Advanced

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

Re: GNU Parallel Bug Reports --ssh 'autossh' not working and --ssh 'auto


From: Marco Tamassia
Subject: Re: GNU Parallel Bug Reports --ssh 'autossh' not working and --ssh 'autossh -M {PORT} not expanded
Date: Tue, 22 Sep 2015 14:52:50 +1000

I forgot to mention my Parallel version.

address@hidden ~ $ parallel -V
GNU parallel 20150909
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015 Ole Tange
and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

Web site: http://www.gnu.org/software/parallel

When using programs that use GNU Parallel to process data for publication
please cite as described in 'parallel --bibtex'.
address@hidden ~ $


On 22 September 2015 at 13:06, Marco Tamassia <address@hidden> wrote:
Hi,

I am trying to use parallel with autossh, so to have stable connections (the idea is to use it in concert with screen, so that a broken connection does not interrupt the execution of my scripts).

If I run my command with --ssh 'ssh', everything works.

address@hidden ~/Desktop/multiagent $ parallel --sshlogin localhost --ssh 'ssh' echo ::: 1
1
address@hidden ~/Desktop/multiagent $

However, when I run my command with --ssh 'autossh', a perl error appears.

address@hidden ~/Desktop/multiagent $ parallel --sshlogin localhost --ssh 'autossh' echo ::: 1
/usr/lib/autossh/autossh: invalid option -- '-'
usage: autossh [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]

    -M specifies monitor port. Overrides the environment
       variable AUTOSSH_PORT. 0 turns monitoring loop off.
       Alternatively, a port for an echo service on the remote
       machine may be specified. (Normally port 7.)
    -f run in background (autossh handles this, and does not
       pass it to ssh.)
    -V print autossh version and exit.

Environment variables are:
    AUTOSSH_GATETIME    - how long must an ssh session be established
                          before we decide it really was established
                          (in seconds). Default is 30 seconds; use of -f
                          flag sets this to 0.
    AUTOSSH_LOGFILE     - file to log to (default is to use the syslog
                          facility)
    AUTOSSH_LOGLEVEL    - level of log verbosity
    AUTOSSH_MAXLIFETIME - set the maximum time to live (seconds)
    AUTOSSH_MAXSTART    - max times to restart (default is no limit)
    AUTOSSH_MESSAGE     - message to append to echo string (max 64 bytes)
    AUTOSSH_PATH        - path to ssh if not default
    AUTOSSH_PIDFILE     - write pid to this file
    AUTOSSH_POLL        - how often to check the connection (seconds)
    AUTOSSH_FIRST_POLL  - time before first connection check (seconds)
    AUTOSSH_PORT        - port to use for monitor connection
    AUTOSSH_DEBUG       - turn logging to maximum verbosity and log to
                          stderr

parallel: Warning: Could not figure out number of cpus on localhost (). Using 1.
Bad escape character ''@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64");eval"@GNU_Parallel";$SIG{CHLD}="IGNORE";my$zip=(grep{-x$_}"/usr/local/bin/bzip2")[0]||"bzip2";my($in,$out,$eval);open3($in,$out,">&STDERR",$zip,"-dc");if(my$perlpid=fork){close$in;$eval=join"",<$out>;close$out;}else{close$out;print$in(decode_base64(join"",@ARGV));close$in;exit;}wait;eval$eval;''.
address@hidden ~/Desktop/multiagent $


Furthermore, I plan to run autossh with port monitoring. However, since more of these connections will be launched in parallel, I need to parameterize the arguments to autossh so that different ports are used for parallel connections. The argument would look like --ssh 'autossh -M {PORT}, but this is currently not expanded.

address@hidden ~/Desktop/multiagent $ parallel --sshlogin localhost --ssh 'ssh '{} whoami ::: 1
ssh: Could not resolve hostname {}: Name or service not known
parallel: Warning: Could not figure out number of cpus on localhost (). Using 1.
ssh: Could not resolve hostname {}: Name or service not known
address@hidden ~/Desktop/multiagent $


Once again, thanks for maintaining this awesome tool!

Kind Regards,
Marco Tamassia



--
Marco Tamassia

reply via email to

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