Wednesday, February 2, 2022

[SOLVED] gnu-parallel: exec: perl: not found

Issue

I have 3 EC2 instances with as OS Centos7. I've installed parallel on one of the instances (server1).

It's possible to acces so no SSH issue

ssh [email protected] date gave me the date.

ssh $SERVER echo works
works

Here I've created a ALL_SERVERS -file which contains the hostnames of my servers ([email protected]).

Now I've written a short bash-script with the name test:

#!/bin/bash
echo 'hello'

I want to run this script (started on server1). also on server2 and server3 at the same time.

parallel ./test.sh --sshloginfile ALL_SERVERS

But it's just showing Academic tradition requires you to cite works you base your article on.... And after a few enters it's showing hello (only on my server1).

Can someone explaining what I'm doing wrong.

EDIT: Also tried it without the file:

    parallel --sshlogin [email protected] echo hello

output: bash: line 0: exec: perl: not found

I tried this too:

parallel --tag --nonall --slf ALL_SERVERS

Now I get:

[email protected]  bash: line 0: exec: perl: not found
[email protected]  bash: line 0: exec: perl: not found

Solution

This:

parallel ./test.sh --sshloginfile ALL_SERVERS

is not the same as:

parallel --sshloginfile ALL_SERVERS ./test.sh

You want the last.

perl must be installed on the workers.

ssh remote perl -e \''print "OK\n"'\'

must return OK.



Answered By - Ole Tange
Answer Checked By - Gilberto Lyons (WPSolving Admin)