CPAN::Forum
Net-SFTP - Net::SFTP 0.10 - Broken Pipe error
| Posted on Wed Dec 21 21:38:09 2005 by tla |
| Net::SFTP 0.10 - Broken Pipe error |
|
Hi,
Environment is:
CLIENT:
Net-SSH-Perl-1.29
Net-SFTP-0.10
Perl 5.8.7
Solaris 2.6 / SPARC
SERVER:
Solaris SSH 1.0.1
Solaris 5.9 / SPARC
On the client, I also have installed:
OpenSSL 0.9.8a 11 Oct 2005
OpenSSH_4.2p1
If I sftp (using the openSSH version) from the CLIENT to the SERVER, it works fine. I can login using DSA key based authentication (authorized_keys) and transfer files. The Perl SSH and SFTP module test scripts reported no errors on installation. If I use Net::SFTP I see the following error (nmsd01 is CLIENT, diablo is SERVER):
./test-net-sftp.pl
Connecting to: diablo (public key)
nmsd01: Reading configuration data //.ssh/config
nmsd01: Reading configuration data /etc/ssh_config
nmsd01: Allocated local port 1023.
nmsd01: Connecting to diablo, port 22.
nmsd01: Remote version string: SSH-2.0-Sun_SSH_1.0.1
nmsd01: Remote protocol version 2.0, remote software version Sun_SSH_1.0.1
nmsd01: Net::SSH::Perl Version 1.29, protocol version 2.0.
nmsd01: No compat match: Sun_SSH_1.0.1.
nmsd01: Connection established.
nmsd01: Sent key-exchange init (KEXINIT), wait response.
nmsd01: Algorithms, c->s: 3des-cbc hmac-sha1 none
nmsd01: Algorithms, s->c: 3des-cbc hmac-sha1 none
<long pause - ~5 minutes>
nmsd01: Entering Diffie-Hellman Group 1 key exchange.
nmsd01: Sent DH public key, waiting for reply.
nmsd01: Received host key, type 'ssh-dss'.
nmsd01: Host 'diablo' is known and matches the host key.
nmsd01: Computing shared secret key.
<long pause - ~5 minutes>
nmsd01: Verifying server signature.
<pause - ~1 minutes>
nmsd01: Waiting for NEWKEYS message.
nmsd01: Enabling incoming encryption/MAC/compression.
nmsd01: Send NEWKEYS, enable outgoing encryption/MAC/compression.
nmsd01: Sending request for user-authentication service.
Broken Pipe
real 11m4.036s
user 10m53.990s
sys 0m0.380s
During the long pauses, the test program consumes all available CPU resource. The test script reads as follows:
#!/bin/perl -w
use Net::SFTP;
use strict;
my $nms_file='file1';
my $user='datafeed';
my $nms_host='diablo';
my $dir='12345';
my %args=(ssh_args => []);
$args{debug} = 1;
$args{user} = $user;
print "\nConnecting to: $nms_host (public key)\n";
my $sftp = Net::SFTP->new($nms_host,%args);
print "\nLogging in as user $user\n";
$sftp->login($user);
print "\nMaking directory: $dir\n";
$sftp->mkdir($dir);
print "\nTransferring: $nms_file\n";
$sftp->put("$dir/$nms_file", "$dir/$nms_file");
I don't have access to the server end to perform any debug. Although the client system is very old (SPARC Ultra-1), both CLIENT and SERVER have default 1024 bit DSA keys. I think it should be able to cope with any key manipulation required. As the openSSH version of SFTP works fine it leads me to believe the problem must be in the client Perl implementation / build of SFTP somewhere. I'd appreciate feedback on: 1) possible causes of the problem 2) why is there a long pause after the key exchange init? 3) why does it take ~12m to fail and consume so much CPU? Thanks. |
| Direct Responses: 1509 | Write a response |
(2)
]