Skip Menu |

This queue is for tickets about the Net-SFTP CPAN distribution.

Report information
The Basics
Id: 18577
Status: rejected
Priority: 0/
Queue: Net-SFTP

People
Owner: Nobody in particular
Requestors: kotha.reddy [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: SFTP errors
Hi, I am getting the following error when i am trying to use the SFTP module. Error: Can't set socket non-blocking: Bad file descriptor at :/PXPerl/site/lib/Net/SSH/Perl.pm line 213, <GEN0> line 1. The script look like use Net::SFTP; $ftp = Net::SFTP->new($host) or die "Cannot connect to $host"; $ftp->cwd($data_dir) or die "Cannot change working directory "; $ftp->get($file_name) or die "get failed ", $ftp->message; $ftp->quit; Version details : This is perl, v5.8.7 built for MSWin32-x86-multi-thread Copyright 1987-2005, 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 onthis 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 : Windows Xp Thanks, Sreedhar.
Try installing IO::Handle and upgrading to the latest Net::SFTP/Net::SSH::Perl.
From: cdlvj [...] checkstop.com
On Thu Apr 06 16:27:59 2006, guest wrote: Show quoted text
> Hi, > I am getting the following error when i am trying to use the SFTP > module. > > Error: Can't set socket non-blocking: Bad file descriptor > at :/PXPerl/site/lib/Net/SSH/Perl.pm line 213, <GEN0> line 1. > > The script look like > use Net::SFTP; > $ftp = Net::SFTP->new($host) or die "Cannot connect to $host"; > $ftp->cwd($data_dir) or die "Cannot change working directory "; > $ftp->get($file_name) or die "get failed ", $ftp->message; > $ftp->quit; > > Version details : > > This is perl, v5.8.7 built for MSWin32-x86-multi-thread > > Copyright 1987-2005, Larry Wall > > Perl may be copied only under the terms of either the Artistic
License Show quoted text
> 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 > onthis 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 : Windows Xp > > > Thanks, > Sreedhar.
In your sftp.pm you need use Net::SSH::W32Perl 1.24; my $ssh = Net::SSH::W32Perl->new($sftp->{host}, protocol => 2, Will fix your problem, but then the object will go into a loop.