Subject: | Net-SFTP-Foreign forces my script to exit after timeout |
Installed module version (as CPAN reported):
Module = Net::SFTP::Foreign (SALVA/Net-SFTP-Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Attributes (SALVA/Net-SFTP-
Foreign-0.61.tar.gz)
Module = Net::SFTP::Foreign::Attributes::Compat (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module Net::SFTP::Foreign::Backend::Net_SSH2 (SALVA/Net-SFTP-Foreign-
Backend-Net_SSH2-0.01.tar.gz)
Module = Net::SFTP::Foreign::Backend::Unix (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Backend::Windows (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Buffer (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Common (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Compat (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Constants (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Helpers (SALVA/Net-SFTP-
Foreign-1.57.tar.gz)
Module = Net::SFTP::Foreign::Local (SALVA/Net-SFTP-Foreign-1.57.tar.gz)
Module Net::SFTP::Foreign::Util (SALVA/Net-SFTP-Foreign-0.61.tar.gz)
Perl version:
This is perl, v5.10.0 built for amd64-freebsd-thread-multi
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to
the
Internet, point your browser at http://www.perl.org/, the Perl Home
Page.
OS version:
FreeBSD web2 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07
UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/
GENERIC amd64
I have a lot of servers which my scripts connects to and gathering data
from them by SFTP. But one of servers has very slow connection. When i
tried to connect to it from command line by ssh it took about 3
minutes. I instantiate Net-SFTP-Foreign with following parameters:
my %args = (
host => $self->{server},
user => $config{sshUser},
timeout => 30,
more => [
-i => $config{sshIdentifyFile}
]
);
$self->{sftp} = Net::SFTP::Foreign->new($self->{server}, %args);
When scripts trying to connect to that extremely slow server, it takes
more than 30 seconds, and after 30 secs timeout is reached scripts
exits abnormally with following exit code: "Alarm clock: 14"
As a result script exited before it should and all data is lost :(.
Please save my ass :(((