gnu-parallel: exec: perl: not found



我有 3 个 EC2 实例,作为操作系统 Centos7。我已经在其中一个实例(服务器 1)上并行安装。

可以访问,因此没有SSH问题

ssh root@ip-10-0-xx-xx.xx-xx-1.compute.internal date给了期。

ssh $SERVER echo works
works

在这里,我创建了一个ALL_SERVERS文件,其中包含我的服务器的主机名(root@ip-10-0-xx-xx.xx-xx-1.compute.internal)。

现在我已经编写了一个名为 test 的简短 bash 脚本:

#!/bin/bash
echo 'hello'

我想运行这个脚本(在服务器 1 上启动)。 也同时在服务器 2 和服务器 3 上运行。

parallel ./test.sh --sshloginfile ALL_SERVERS

但它只是在展示Academic tradition requires you to cite works you base your article on....输入几次后,它会显示你好(仅在我的服务器上1)。

有人可以解释我做错了什么吗?

编辑:也尝试了没有文件:

    parallel --sshlogin root@ip-10-0-xx-xx.xx-xx-1.compute.internal echo hello
output: bash: line 0: exec: perl: not found

我也试过这个:

parallel --tag --nonall --slf ALL_SERVERS

现在我得到:

root@ip-10-0-0-xx.xx-xx-1.compute.internal  bash: line 0: exec: perl: not found
root@ip-10-0-0-xx.xx-xx-1.compute.internal  bash: line 0: exec: perl: not found

这个:

parallel ./test.sh --sshloginfile ALL_SERVERS

与以下不同:

parallel --sshloginfile ALL_SERVERS ./test.sh

你想要最后一个。

perl必须安装在工人身上。

ssh remote perl -e ''print "OKn"''

必须返回确定。

最新更新