Subject: Re: Debugging SCP failure: "Timed out waiting for SCP response"

Re: Debugging SCP failure: "Timed out waiting for SCP response"

From: Uli Zappe <uli_at_ritual.org>
Date: Mon, 11 Oct 2010 11:49:33 +0200

Am 11.10.2010 um 09:51 schrieb Tim Martin:

> The client can connect to the server and authenticate OK. I can also execute commands on the remote shell OK. However, when I try and call libssh2_scp_recv() I always get a null result.
> [...]
> The most noticeable log line is
>
> [libssh2] 1.001111 Failure Event: -28 - Timed out waiting for SCP response
> [...]
> I'd be grateful for any pointers as to how to proceed with this. I don't mind dipping into the libssh2 code, but I don't have the time to grok it at the moment. I'm fairly sure the problem ultimately lies on the RouterOS side

Could it possibly be (due to an error on the RouterOS side or whatever) that the file you're trying to receive has a size of 0 Byte? I encountered the issue that in this case libssh2 (at least libssh2-1.2.7) immediately returns but logs a timeout error. (But Daniel Stenberg could not reproduce this with the current github build.)

> I don't know what the timeout should be, but it certainly isn't waiting very long before timing out (a fraction of a second at most).

The (fixed) timeout of libssh2 is 60 seconds. You should never get a timeout error message before this timespan, if I understand this correctly.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstraße 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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