Good thought. Rather than using the debian packaged versions, I installed the following versions:
libnet-ssh2-perl 0.56-1
libssh2-1:amd64 1.5.0-2
libssh2-1-dev:amd64 1.5.0-2
libssh2 I pulled from debian unstable and did an SSB to jessie, libnet-ssh2-perl I pulled from CPAN and made a deb out of it. No change in the behavior.
I added the following code to play with the timeouts as VinsWorldcom suggested with no change in behavior:
if ($model =~ /$nexus/) {
my $output;
$sok->timeout(10);
@cmdoutput = $sok->cmd(
String => "copy startup-config tftp://$tftp_server/$con
+figfile vrf $vrf\n\n\n",
Errmode => "return",
);
print Dumper @cmdoutput;
if ($sok->errmsg){
($error) = $sok->errmsg;
print "Nexus IP: $host: Command failed reason: $error. Trying ag
+ain...\n" ;
$sok->timeout(10);
@cmdoutput = $sok->cmd(
String => "copy startup-config tftp://$tftp_server/$c
+onfigfile vrf management\n\n\n",
Errmode => "return",
);
$sok->waitfor (
String => '#',
Timeout => '5',
Waitfor_clear => '1',
);
print Dumper @cmdoutput;
print "Nexus IP: $host: Command failed reason: $error\n" ;
}
}
|