jgiller has asked for the wisdom of the Perl Monks concerning the following question:
Any ideas? It barfs after successfully rsh'ing to 5 hosts.sub runCommands { $a=Net::Rsh->new(); $host="$ip"; $local_user="root"; $remote_user="root"; $cmd="/home/admin/master/pushout/scripts/$program"; if ( defined($a) ) { $status = $a->rsh($host,$local_user,$remote_user,$cmd); if ( ! defined($status) ) { $msg = $rsh->errmsg; print "\t$msg\n"; print LOG "\t$ip\t$msg\n"; $rsh->close; } else { print PING "$ip $hostname\n"; # Run the program $a->rsh($host,$local_user,$remote_user,$cmd); sleep 1; } } else { print "\t$ip\tConnection refused.\n"; print LOG "\t$ip\tConnection refused.\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rsh dies with EADDRINUSE
by Fletch (Bishop) on Mar 01, 2007 at 19:02 UTC | |
|
Re: Rsh dies with EADDRINUSE
by merlyn (Sage) on Mar 01, 2007 at 19:12 UTC | |
by shandor (Monk) on Mar 01, 2007 at 20:22 UTC | |
by Fletch (Bishop) on Mar 01, 2007 at 22:03 UTC | |
by bluto (Curate) on Mar 01, 2007 at 20:15 UTC | |
|
Re: Rsh dies with EADDRINUSE
by jettero (Monsignor) on Mar 01, 2007 at 18:46 UTC | |
|
Re: Rsh dies with EADDRINUSE
by almut (Canon) on Mar 01, 2007 at 19:51 UTC | |
|
Re: Rsh dies with EADDRINUSE
by perrin (Chancellor) on Mar 02, 2007 at 17:33 UTC |