Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

jpantera

Re-try Logic with Script File?

Hello WinSCP Support / Martin,

We recently switched over to an updated system to perform our file transfers to / from, and with one particular connection, we're getting a higher frequency of failed connections with them.

The WinSCP logs all show this, when the failure occurs:

. 2025-07-21 01:30:13.757 --------------------------------------------------------------------------
< 2025-07-21 01:30:13.757 Script: Searching for host...
. 2025-07-21 01:30:13.757 Looking up host "<The SFTP Server Having Issues>.com" for SSH connection
. 2025-07-21 01:30:13.789 Connecting to <The SFTP Server Having Issues IP Address> port 22
. 2025-07-21 01:30:34.821 Failed to connect to <The SFTP Server Having Issues IP Address>: Network error: Connection timed out
. 2025-07-21 01:30:34.821 Knocking FTP port.
. 2025-07-21 01:30:36.969 FTP port did not open.
< 2025-07-21 01:30:36.969 Script: Network error: Connection to "<The SFTP Server Having Issues>" timed out.
. 2025-07-21 06:50:07.414 --------------------------------------------------------------------------

log ends abruptly.

Two questions...

Can we turn off the automatic trying of FTP (or should we?).
How in the WinSCP logic, outside of my script, can we ask WinSCP to re-try the connection, because it seems to only be trying once and quitting.

We perform a lot of file transfers to / from this connection, and in some cases, the upload at the same time is successful, while the download is not, so a re-try might get us past the new escalation of disconnects.

Thank you!

- Joe P.