Topic "WinSCP fails to detect server disconnect"

Author Message
ceejayemm

Guest


WinSCP Version: 5.1.3
OS; Windows 2008 Standard 32 bit

Running WinSCP.com via batch file using commandline:
winscp.com /ini="C:\Program Files\WinSCP\WinSCP.ini" /script="ICISPRD_OB10.ftp"

ICISPRD_OB10.ftp contains:
option batch abort
option confirm off
open OB10_Production
get *.TXT
exit

OB10_Production is a stored session within WinSCP.

The external server this connects to has occasional problems rejecting connections but a rerun of the process normally solves the problem. Today however the external refused to connect at all due to a problem at their end, WinSCP kept retrying as shown in the attached logfile until the server appears to have been turned off. This however DID NOT cause the connection to fail and the batch file continued to wait at the winscp command line for further actions to be taken until the job was forcibly killed an hour or so later.

How can I get WinSCP to detect this kind of error and report it back to the batch file so that processing can realise there is an error and gracefully finish ?

Chris
winscp_log.zip (6.11 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
WinSCP should timeout after 10 seconds when "option batch" is set.
So this should not happen.
Are you able ro reproduce the problem?
_________________
Martin Prikryl
ceejayemm

Guest


Martin

Not easily I am afraid as the server which causes this problem is external to us and we only know we have this problem when it occurs.

I can see that the process stalls for 15 secs at atime (in the logfile I attached originally) but the final timeout doesn't seem to happen. if it did then may be the surrounding script would catch and report the error so I could do somethign about it. Without WinSCP exiting when this problem occurs we simply end up with a hung process.

Chris
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License