Subject: Re: Error Handling with Net::SSH2

Re: Error Handling with Net::SSH2

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 12 Jul 2010 20:34:30 +0200 (CEST)

On Mon, 12 Jul 2010, David E. Wheeler wrote:

> The error, thrown in that last statement, is:
>
> -37 LIBSSH2_ERROR_EAGAIN Would block requesting userauth list

This might be a wrong error code as I think we fixed a bug related to such a
case a while ago. What libssh2 version are you using?

> The second error comes from this statement at line 177:
>
> $sftp->rename($temp_dest, $dest_file) or throw_gen(
> error => "Error renaming '$temp_dest' to '$dest_file' on '$hn'",
> payload => join ' ', $sftp->error
> );
>
> The error is:
>
> 4 SSH_FX_FAILURE
>
> Which seems to be because the server to which we've connected has generated
> some sort of error. But beyond that, I'm mystified. The call to scp_put()
> appears to have worked at line 172, so I'm not sure why it would complain
> about a rename(). Is there any way to get more information about the
> underlying error?

I would recommend enabling debug tracing with libssh2 and that you then submit
that log here. But a related test is also to see if for example openssh's sftp
client can do the rename without problem.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-07-12