Is it possible that your server detects too many sessions from one ip and terminates the connection?
The problem is that the sessions are being made to different ip's in a concurrent fashion. So it's not just a (well not obviously at least) case of the destination server not allowing multiple simaltanoeus connections to it.
I can quite happily make as many active and non-active connections to the same ip without drama, by both hand and through the script.
could you please update the node with your Parallel::ForkManager code and I can run a quick check on my server?
A cutdown, very simple version of what I'm doing would be as follows:
#!/usr/bin/perl -w use strict; use Parallel::ForkManager; my (@hosts) = ("192.168.0.1","192.168.0.2","192.168.0.3"); my $sshscript = "ssh.pl"; my $maxProbes = 3; # set this to one to do one at a time my $pm = new Parallel::ForkManager($maxProbes); foreach my $hostname (@hosts) { $pm->start and next; my $stdout = `./$sshscript $hostname`; print "$stdout\n"; $pm->finish; } $pm->wait_all_children; print "done\n";
with the snippet from the original node saved as ssh.pl and adjusted so that it set $host to the value of $ARGV[0]
Cheers for your time and reply.
Anth
In reply to Re^2: Net::SSH::Perl and simaltaneous connections
by anthski
in thread Net::SSH::Perl and simaltaneous connections
by anthski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |