Skip Menu |

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

Report information
The Basics
Id: 36232
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: salva [...] cpan.org
Requestors: salva [...] cpan.org
Cc:
AdminCc:

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



Subject: The requested operation cannot be performed because there is a file transfer in progress
From http://www.tek-tips.com/viewthread.cfm?qid=1460569&page=6: -------------------------------------------------------------- I decided to go the Net::SFTP::Foreign route but I'm getting a different error with it on the ->put() call. I'll search the posts for this error and repost if I can't find anything. CODE #!/usr/bin/perl -X use Net::SFTP::Foreign; my $host = ""; my $username = ""; my $password = ""; my $directory = ""; $Net::SFTP::Foreign::debug = 1; my $sftp = Net::SFTP::Foreign->new( "$username\@$host", password => $password ); $sftp->setcwd( "$directory" ); $sftp->put( "test_file.txt" => "test_file.txt" ); if ( $sftp->error ) { print "Put error: " . $sftp->error . "\n"; print "Put status: " . $sftp->status . "\n"; } Quote: => perl test2.pl # queueing msg len: 5, code:1, id:3 ... [1] # waiting for message... [1] # got it!, len:5, code:2, id:3, status: - # queueing msg len: 15, code:16, id:0 ... [1] # waiting for message... [1] # got it!, len:63, code:104, id:0, status: - # queueing msg len: 42, code:3, id:1 ... [1] # waiting for message... [1] # got it!, len:10, code:102, id:1, status: - # queueing msg len: 18, code:10, id:2 ... [1] # waiting for message... [1] # got it!, len:106, code:101, id:2, status: 3 # queueing msg len: 10, code:4, id:3 ... [1] # waiting for message... [1] # got it!, len:40, code:101, id:3, status: 0 Put error: Couldn't setstat remote file (fsetstat): The requested operation cannot be performed because there is a file transfer in progress. Put status: The requested operation cannot be performed because there is a file transfer in progress.
From: odunbar [...] adeptra.com
On Tue May 27 17:26:16 2008, SALVA wrote: Show quoted text
> From http://www.tek-tips.com/viewthread.cfm?qid=1460569&page=6: > -------------------------------------------------------------- > > I decided to go the Net::SFTP::Foreign route but I'm getting a different > error with it on the ->put() call. I'll search the posts for this error > and repost if I can't find anything.
Show quoted text
> Put error: Couldn't setstat remote file (fsetstat): The requested > operation cannot be performed because there is a file transfer in
progress. Show quoted text
> Put status: The requested operation cannot be performed because > there is a file transfer in progress.
This looks identical to an error we are receiving when we try to do a put to specific SFTP Server Software (we encountered the problem with Tumbleweed) where it creates the file with the open but is then unable to fsetstat on the open file (setting attributes on files in case the file already existed prior to the open). We have worked around the problem by adding a flag 'guarantee_no_file' which we set when we can be sure the file won't exist which simply bypasses the fsetstat code since it isn't required in these cases. While this works it does require prior knowledge of whether a file will exist or not which would be nice to avoid if possible.
Subject: Re: [rt.cpan.org #36232] The requested operation cannot be performed because there is a file transfer in progress
Date: Tue, 28 Oct 2008 08:47:07 -0700 (PDT)
To: bug-Net-SFTP-Foreign [...] rt.cpan.org
From: Salvador Fandino <sfandino [...] yahoo.com>
hi, Show quoted text
> This looks identical to an error we are receiving when we try to do a > put to specific SFTP Server Software (we encountered the problem with > Tumbleweed) where it creates the file with the open but is then unable > to fsetstat on the open file (setting attributes on files in case the > file already existed prior to the open). We have worked around the > problem by adding a flag 'guarantee_no_file' which we set when we can be > sure the file won't exist which simply bypasses the fsetstat code since > it isn't required in these cases. > > While this works it does require prior knowledge of whether a file will > exist or not which would be nice to avoid if possible.
Could you send me a dump for the $sftp object (using Data::Dumper for instance, but remove any password)after the connection has been stablished, so I can see how to identify the server and apply some workaround for that specific case? - Salva
CC: odunbar [...] adeptra.com
Subject: Re: [rt.cpan.org #36232] The requested operation cannot be performed because there is a file transfer in progress
Date: Tue, 28 Oct 2008 09:26:05 -0700 (PDT)
To: bug-Net-SFTP-Foreign [...] rt.cpan.org
From: Salvador Fandino <sfandino [...] yahoo.com>
hi, Show quoted text
> This looks identical to an error we are receiving when we try to do a > put to specific SFTP Server Software (we encountered the problem with > Tumbleweed) where it creates the file with the open but is then unable > to fsetstat on the open file (setting attributes on files in case the > file already existed prior to the open). We have worked around the > problem by adding a flag 'guarantee_no_file' which we set when we can be > sure the file won't exist which simply bypasses the fsetstat code since > it isn't required in these cases. > > While this works it does require prior knowledge of whether a file will > exist or not which would be nice to avoid if possible.
Could you send me a dump for the $sftp object (using Data::Dumper for instance, but remove any password)after the connection has been stablished, so I can see how to identify the server and apply some workaround for that specific case? - Salva
No further feedback from the reporters. Assume it was fixed.