From chris [...] mcroberts.co Thu Oct 4 13: | 29:47 2012 |
MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-6.176 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_HI=-5] autolearn=ham |
X-Spam-Flag: | NO |
Message-ID: | <20121004102932.cbebfd312bd62adb3baadf8c1faedb81.a262eb088f.wbe [...] email13.secureserver.net> |
Content-Type: | text/html; charset="utf-8" |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Sid: | 75VZ1k004057xwS01 |
X-Spam-Score: | -6.176 |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 60D68240887 for <cpan-bug+perl-dist-strawberry [...] hipster.bestpractical.com>; Thu, 4 Oct 2012 13:29:47 -0400 (EDT) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mM1kKGLNrYAg for <cpan-bug+perl-dist-strawberry [...] hipster.bestpractical.com>; Thu, 4 Oct 2012 13:29:45 -0400 (EDT) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 4555224087F for <bug-perl-dist-strawberry [...] rt.cpan.org>; Thu, 4 Oct 2012 13:29:45 -0400 (EDT) |
Received: | (qmail 26059 invoked by uid 103); 4 Oct 2012 17:29:44 -0000 |
Received: | from x16.dev (10.0.100.26) by x1.dev with QMQP; 4 Oct 2012 17:29:44 -0000 |
Received: | from p3plsmtp13-06-2.prod.phx3.secureserver.net (HELO p3plwbeout13-06.prod.phx3.secureserver.net) (173.201.192.172) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Thu, 04 Oct 2012 10:29:37 -0700 |
Received: | from localhost ([10.6.247.3]) by p3plwbeout13-06.prod.phx3.secureserver.net with bizsmtp id 75VZ1k004057xwS015VZNb; Thu, 04 Oct 2012 10:29:33 -0700 |
Received: | (qmail 21808 invoked by uid 99); 4 Oct 2012 17:29:33 -0000 |
Delivered-To: | cpan-bug+perl-dist-strawberry [...] hipster.bestpractical.com |
Subject: | But Report: SP 5.16 and Net::SSH2 scp_get |
User-Agent: | Workspace Webmail 5.6.25 |
Return-Path: | <chris [...] mcroberts.co> |
X-RT-Mail-Extension: | perl-dist-strawberry |
X-Original-To: | cpan-bug+perl-dist-strawberry [...] hipster.bestpractical.com |
X-Spam-Check-BY: | 16.mx.develooper.com |
Date: | Thu, 04 Oct 2012 10:29:32 -0700 |
X-Spam-Level: | |
X-Originating-Ip: | 173.36.196.10 |
X-Cmae: | v=2.0 cv=daUCLAre c=1 sm=1 a=l2uZmt7ihScA:10 a=QxD3r7Q-ggoA:10 a=3G35LjA-pM0A:10 a=jPJDawAOAc8A:10 a=IkcTkHD0fZMA:10 a=TZb1taSUAAAA:8 a=Zkl5xcc1OH8A:10 a=x942Lnjl7ssl6tkqdzIA:9 a=QEXdDO2ut3YA:10 a=_W_S_7VecoQA:10 a=szLhwfEcLJQA:10 a=tTdmK6DI6dXKJ3AT:21 a=fLjVhd8n_cBJ5q6b:21 a=yIV1G_CiAsNbxMm4:21 a=DDSVMKCQNWWkO8c7FYSROA==:117 |
To: | bug-Perl-Dist-Strawberry [...] rt.cpan.org |
Content-Transfer-Encoding: | quoted-printable |
From: | <chris [...] mcroberts.co> |
X-RT-Original-Encoding: | utf-8 |
Content-Length: | 6097 |
Hi,
My apologies in advance if this is in some way user error.
While trying to upgrade from Strawberry Perl 5.12 to 5.16, I found that scp_get in Net:SSH2 has stopped working. General Channel functions work, and scp_put works, but scp_get does not. It is claiming to only download 1 byte, almost as if its skipping the actual file download and going straight to closing the Channel activity.
To create the problem, I simply unzipped the distributions, launched the portableshell.bat for each one, navigated to my script directory and tried to run it.
Perl Versions:
strawberry-perl-5.12.3.0-portable (Works)
strawberry-perl-5.16.1.1-32bit-portable (Fails)
strawberry-perl-5.16.1.1-64bit-portable (Fails)
Windows Host 1 Version: Windows 7 Enterprise, Version 6.1, Build 7600, 64-bit
While trying to upgrade from Strawberry Perl 5.12 to 5.16, I found that scp_get in Net:SSH2 has stopped working. General Channel functions work, and scp_put works, but scp_get does not. It is claiming to only download 1 byte, almost as if its skipping the actual file download and going straight to closing the Channel activity.
To create the problem, I simply unzipped the distributions, launched the portableshell.bat for each one, navigated to my script directory and tried to run it.
Perl Versions:
strawberry-perl-5.12.3.0-portable (Works)
strawberry-perl-5.16.1.1-32bit-portable (Fails)
strawberry-perl-5.16.1.1-64bit-portable (Fails)
Windows Host 1 Version: Windows 7 Enterprise, Version 6.1, Build 7600, 64-bit
Windows Host 2 Version: Windows 7 Enterprise, Version 6.1, Build 7601, SP1, 64-bit
SSH2 Destination Host Version: Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
SSH2 Destination Host Version: Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
UserName, Password, Destination Host, and File Name have been blanked out.
Please let me know if I can provide any additional information.
Code:
use Net::SSH2;
my ($User, $PW) = ('[UserName]', '[Password]');
my $SSH2 = Net::SSH2->new();
if ($SSH2->connect('[HostName]')) {
if ($SSH2->auth_password($User, $PW)) {
my $Chan = $SSH2->channel();
$Chan->blocking(1);
my $TmpOutFile = "[FileName]";
$SSH2->debug(1);
use IO::Scalar;
my $FileData = IO::Scalar->new;
$SSH2->scp_get($TmpOutFile, $FileData);
print "SSH2 Error: ",$SSH2->error(),"\n";
my @Data = split(/\n/, $FileData);
print "Number of Lines: ",($#Data+1),"\n";
$Chan->close;
} else { print "2_Login",join("|",$SSH2->error()), "\n"; }
} else { print "1_Connect",join("|",$SSH2->error()), "\n"; }
$SSH2->disconnect();
FAILED OUTPUT: strawberry-perl-5.16.1.1-32bit-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x2e68cf4
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: 0
Number of Lines: 0
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x22d838c
FAILED OUTPUT: strawberry-perl-5.16.1.1-64bit-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x26545d8
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: 0
Number of Lines: 0
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x25968f8
SUCCESSFUL OUTPUT: strawberry-perl-5.12.3.0-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x2dfa7a4
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 1589, ext = 0)
- read 1589 bytes
- read 1589 total
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: -37LIBSSH2_ERROR_EAGAINWould block waiting for SCP response
Number of Lines: 3164
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x1f9ae7c
use Net::SSH2;
my ($User, $PW) = ('[UserName]', '[Password]');
my $SSH2 = Net::SSH2->new();
if ($SSH2->connect('[HostName]')) {
if ($SSH2->auth_password($User, $PW)) {
my $Chan = $SSH2->channel();
$Chan->blocking(1);
my $TmpOutFile = "[FileName]";
$SSH2->debug(1);
use IO::Scalar;
my $FileData = IO::Scalar->new;
$SSH2->scp_get($TmpOutFile, $FileData);
print "SSH2 Error: ",$SSH2->error(),"\n";
my @Data = split(/\n/, $FileData);
print "Number of Lines: ",($#Data+1),"\n";
$Chan->close;
} else { print "2_Login",join("|",$SSH2->error()), "\n"; }
} else { print "1_Connect",join("|",$SSH2->error()), "\n"; }
$SSH2->disconnect();
FAILED OUTPUT: strawberry-perl-5.16.1.1-32bit-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x2e68cf4
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: 0
Number of Lines: 0
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x22d838c
FAILED OUTPUT: strawberry-perl-5.16.1.1-64bit-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x26545d8
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: 0
Number of Lines: 0
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x25968f8
SUCCESSFUL OUTPUT: strawberry-perl-5.12.3.0-portable
libssh2_scp_recv(ss->session, path, &st) -> 0x2dfa7a4
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 8192, ext = 0)
- read 8192 bytes
- read 8192 total
Net::SSH2::Channel::read(size = 1589, ext = 0)
- read 1589 bytes
- read 1589 total
Net::SSH2::Channel::read(size = 1, ext = 0)
- read 1 bytes
- read 1 total
Net::SSH2::Channel::DESTROY
SSH2 Error: -37LIBSSH2_ERROR_EAGAINWould block waiting for SCP response
Number of Lines: 3164
Net::SSH2::Channel::DESTROY
Net::SSH2::DESTROY object 0x1f9ae7c
Thanks!