SSHLibrary icon indicating copy to clipboard operation
SSHLibrary copied to clipboard

non-configurable timeout for scp

Open pulkomandy opened this issue 3 years ago • 3 comments

scp.py has a default but configurable timeout of 10 seconds: https://github.com/jbardin/scp.py/blob/master/scp.py#L103

In our case this is sometimes too short. Our ssh server takes a long time to reply to the connection request (probably because of misconfigured DNS causing DNS lookup timeouts). As a result we get a timeout error.

This timeout does not seem to be configurable without modifying sshlibrary. The connection timeout (used for Read Until) is not forwarded to scp.py, and there is no other way to set it (I don't know if it makes sense to use the same timeout). Only the transport is passed to the SCPClient constructor: https://github.com/robotframework/SSHLibrary/blob/master/src/SSHLibrary/pythonclient.py#L394

Does it make sense to reuse the timeout from the connection configuration for this? If that's appropriate, I think the fix would be reasonably easy to do.

pulkomandy avatar Jan 10 '22 10:01 pulkomandy

I have similar issue, have you found the workaround?

KirillYatsenko avatar Dec 22 '22 09:12 KirillYatsenko

Hi, I've created a simple MR for this issue: https://github.com/robotframework/SSHLibrary/pull/423

KirillYatsenko avatar Dec 23 '22 15:12 KirillYatsenko

@pekkaklarck can we merge MR which resolves this issue?

KirillYatsenko avatar May 05 '23 10:05 KirillYatsenko