Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: WinSCP fails to detect server disconnect

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.
ceejayemm

WinSCP fails to detect server disconnect

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

Re: WinSCP fails to detect server disconnect

WinSCP should timeout after 10 seconds when "option batch" is set.
So this should not happen.
Are you able ro reproduce the problem?
ceejayemm

WinSCP fails to detect server disconnect

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