Gnu 并行卡住,不提供输出

Gnu parallel getting stuck, not giving output

Parallel 似乎安装正确,因为我能够 运行 基本的并行检查命令。

# parallel --version
GNU parallel 20161222
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016
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 --citation'.

但是当我尝试在远程服务器上执行查询时,它没有给出任何输出,也没有 returns 提示.. 例如 :-

parallel ssh {} hostname :::: hosts
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

  O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
  ;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence this citation notice: run 'parallel --citation'.

在上面,例如,hosts 文件包含远程服务器 IP 的列表

即使是简单的 parallel echo ::: A B C 命令 doens 也会给出输出..

我尝试了 运行 /usr/bin/parallel 但问题仍然存在..

当我 运行 命令使用 bash -x 时,我收到以下错误:-

bash -x parallel ssh {} hostname :::: hosts
+ use IPC::Open3
/usr/bin/parallel: line 22: use: command not found
/usr/bin/parallel: parallel: line 24: syntax error near unexpected token `('
/usr/bin/parallel: parallel: line 24: `use POSIX qw(:sys_wait_h setsid ceil :errno_h);'

我检查了文件 /usr/bin/parallel 我觉得没问题。

无法为此找到解决方案。非常感谢任何帮助。 谢谢。

UPDATE_1 :-

root@sg-server:[~]:# parallel -Dall echo ::: 1
shell? perl /usr/bin/parallel -Dall echo ::: 1
shell? -bash
which -bash => shell path /bin/bash
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

  O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
  ;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; AND IT WON'T COST YOU A CENT.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence this citation notice: run 'parallel --citation'.

Open file descriptors: 2 1
echo Context:  Non: 4 Ctxgrp:  NonCtxGrp: 1
echo ▒<▒> Context:  Non: 4 Ctxgrp: 1 NonCtxGrp: 1
Wanted procs: 16
MultifileQueue->empty  RecordQueue->empty CommandLineQueue->empty JobQueue->empty  MultifileQueue->empty  RecordQueue->empty eval  1
noncontext + command: 5
context+noncontext + command: 5
cmd_line->number_of_args 1
Replace echo ▒<▒>
Target: echoTarget: ▒<▒>Replacing in ▒<▒>
Return echo 1
noncontext + command: 5
context+noncontext + command: 5
noncontext + command: 5
context+noncontext + command: 5
6 == 6 echo 1
Time to fork 1 procs: 0  (processes so far: 1)
MultifileQueue->empty 1 RecordQueue->empty 1CommandLineQueue->empty 1JobQueue->empty 1 RecordQueue-unget ''
JobQueue->empty  Limited to procs: 1
JobQueue->empty  Running jobs before on ::
: has  out of 1 jobs running. Start another.
JobQueue->empty  Command to run on ':': 'echo 1'
 processes . Starting (1): echo 1
bash -c testfun\(\)\ \{\ rm\ /tmp/parTMasE.tst\;\ \}\;\ export\ -f\ testfun\;\ perl\ -MIPC::Open3\ -e\ if\\(\$pid\\=::open3\\(\$i,\$o,\$e,\\"-\\"\\)\\)\\ \\{\\ wait\\;\\ \\}\\ else\\ \\{\\ exec\\(\\"bash\\",\\"-c\\",\\"testfun\\ \\&\\&\\ true\\"\\)\\;\\ \\} 2>/dev/null


^Ckill_sleep TERM
kill_sleep TERM
kill_sleep TERM
kill_sleep KILL

即使在 运行ning parallel -Dall echo ::: 1 命令上,我也必须按 CTRL+c 才能恢复提示。

正如我们在评论中调试的那样,您的 (/usr/local)/bin/rm 不是正常的 (/usr/local)/bin/rm