Subject: Re: Error Handling with Net::SSH2

Re: Error Handling with Net::SSH2

From: David E. Wheeler <david_at_kineticode.com>
Date: Tue, 13 Jul 2010 11:45:11 -0700

On Jul 12, 2010, at 8:25 PM, David E. Wheeler wrote:

>> The difference was just that one extra line in the error log:
>> "Net::SSH2: created new object 0x23561e88"
>
> Bah! Okay, there is no way to turn on ssh2 tracing via the Net::SSH2 API. You'll have to uncomment this line in SSH2.xs and rebuild:
>
> /*libssh2_trace(RETVAL->session, -1);*/ /* enable tracing if debug build */

Okay, now I'm getting the error:

Error putting file '/usr/local/htdocs/foo.ppt' on 'prod.example.com': -37 LIBSSH2_ERROR_EAGAIN Unable to send channel data

The file was only partly distributed (it's 30MB but only 1.8M made it over).

I rebuilt with debugging enabled, but then the transfer worked! So I built again with debugging disabled and it went back to partial transfers. Frustrating.

I ran into this same issue a few weeks ago, but at that time we noticed that the symlink, /usr/local/lib/libssh2.so, was pointed at an older install. We updated it to a newer version and all was well. But now it's back, all the old files are gone, and this failure has returned.

I can produce the (huge!) log of the trace output of the successful scp if you think it will help.

Thanks,

David

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