You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have seen ssh connect get stuck when, for some unknown reason, the destination server can not be reached.
This cause the connect to block for a undefined length of time, pending on the underlying system I think. I have seen like 4 minutes before it returns with an exception. And it try this 3 times.
When this happens none of the other clients get their request handled, and when the connection finally get to the next client the file is deleted by the server and any transfer fails.
I want to add a timeout in the SSHClient connect.
Debugging this I to like this:
>>> from trollmoves import movers
>>> m = movers.ScpMover("/tmp/test", "scp://ubuntu@<test-address>:22/home/ubuntu")
>>> m.open_connection()
<paramiko.client.SSHClient object at 0x7f1522682850>
>>> m = movers.ScpMover("/tmp/test", "scp://ubuntu@<test-address>:23/home/ubuntu")
>>> m.open_connection()
Unknown exception at init SSHClient: [Errno 110] Connection timed out
Traceback (most recent call last):
File "/home/trygveas/pytroll/trollmoves/trollmoves/movers.py", line 310, in open_connection
ssh_connection.connect(self.destination.hostname,
File "/home/trygveas/miniconda3/envs/trollmoves/lib/python3.9/site-packages/paramiko/client.py", line 358, in connect
retry_on_signal(lambda: sock.connect(addr))
File "/home/trygveas/miniconda3/envs/trollmoves/lib/python3.9/site-packages/paramiko/util.py", line 279, in retry_on_signal
return function()
File "/home/trygveas/miniconda3/envs/trollmoves/lib/python3.9/site-packages/paramiko/client.py", line 358, in <lambda>
retry_on_signal(lambda: sock.connect(addr))
TimeoutError: [Errno 110] Connection timed out
times 3
I'm not 100% this port trick simulates what actually happened, but I looks very like so I will give it a try.
The text was updated successfully, but these errors were encountered:
I have seen ssh connect get stuck when, for some unknown reason, the destination server can not be reached.
This cause the connect to block for a undefined length of time, pending on the underlying system I think. I have seen like 4 minutes before it returns with an exception. And it try this 3 times.
When this happens none of the other clients get their request handled, and when the connection finally get to the next client the file is deleted by the server and any transfer fails.
I want to add a timeout in the SSHClient connect.
Debugging this I to like this:
I'm not 100% this port trick simulates what actually happened, but I looks very like so I will give it a try.
The text was updated successfully, but these errors were encountered: