10

I am using PSSH to run command on other machines to implementing parallel compute using IPyParallel, but I encountered a problem, my command is

pssh -P -h ip.txt -i ipengine --file=~/parallel/test/ipcontroller-engine.json

And after a while, it returned:

[1] 11:54:41 [FAILURE] 192.168.0.112 Timed out, Killed by signal 9
Stderr: 2015-10-12 11:53:41.593 [IPEngineApp] Loading url_file u'/home/fit/parallel/test/ipcontroller-engine.json'
2015-10-12 11:53:41.595 [IPEngineApp] Registering with controller at tcp://192.168.0.115:59413
2015-10-12 11:53:41.628 [IPEngineApp] Starting to monitor the heartbeat signal from the hub every 3010 ms.
2015-10-12 11:53:41.630 [IPEngineApp] Completed registration with id 0
[2] 11:54:41 [FAILURE] 192.168.0.104 Timed out, Killed by signal 9
Stderr: 2015-10-12 11:53:41.647 [IPEngineApp] Loading url_file u'/home/fit/parallel/test/ipcontroller-engine.json'
2015-10-12 11:53:41.648 [IPEngineApp] Registering with controller at tcp://192.168.0.115:59413
2015-10-12 11:53:41.682 [IPEngineApp] Starting to monitor the heartbeat signal from the hub every 3010 ms.
2015-10-12 11:53:41.684 [IPEngineApp] Completed registration with id 1

I think there is something wrong with PSSH, but I don't know how to solve it.

GoingMyWay
  • 16,802
  • 32
  • 96
  • 149

3 Answers3

17

After googling, I found pssh command will only lasted 60 seconds if you not input -t option. So, to solve this, I type the command

pssh -P -h ip.txt -t 100000000 -i ipengine --file=~/parallel/test/ipcontroller-engine.json

And the command will be killed after 100000000 seconds

Update 2020/08/28

Thanks @Nicolas Thery and @Setzer22, instead of setting an arbitrarily large value, you can set -t 0 to disable the timeout functionality.

GoingMyWay
  • 16,802
  • 32
  • 96
  • 149
9

Set pssh to have a timeout of 0 to disable the default 60 second timeout. -t 0

pssh -P -t 0 -h host_file <COMMAND>

The top answer suggests a really long timeout, when you can just disable it.

David Dolan
  • 91
  • 1
  • 2
5
-t timeout
--timeout timeout
Make connections time out after the given number of seconds. With a value of 0, pssh will not timeout any connections.
jeteon
  • 3,471
  • 27
  • 40
Sam Hermans
  • 209
  • 3
  • 2