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

JamesB

Re: Exit Status 0 After Connection Issues

martin wrote:

Please post the logs.


The portions of the logs with the errors are below.

. 2025-10-14 04:00:05.029 --------------------------------------------------------------------------

< 2025-10-14 04:00:05.042 Script: Searching for host...
. 2025-10-14 04:00:05.061 Looking up host "sftp.datapartner.endpoint" for SSH connection
. 2025-10-14 04:00:05.123 Connecting to 12.34.56.789 port 22
. 2025-10-14 04:00:05.139 Connected to 12.34.56.789
< 2025-10-14 04:00:05.139 Script: Connecting to host...
. 2025-10-14 04:00:05.139 We claim version: SSH-2.0-WinSCP_release_6.3.6
. 2025-10-14 04:00:05.139 Connected to 12.34.56.789
. 2025-10-14 04:00:21.595 Waiting for data timed out, asking user what to do.
. 2025-10-14 04:00:21.626 Asking user:
. 2025-10-14 04:00:21.626 **Host is not communicating for 15 seconds.
. 2025-10-14 04:00:21.626
. 2025-10-14 04:00:21.626 Wait for another 15 seconds?** ()
< 2025-10-14 04:00:21.642 Script: Host is not communicating for more than 15 seconds.
< 2025-10-14 04:00:21.642 Still waiting...
< 2025-10-14 04:00:21.642 Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
< 2025-10-14 04:00:21.642 Warning: Aborting this operation will close connection!
. 2025-10-14 04:01:36.176 Answer: No
. 2025-10-14 04:01:36.223 Attempt to close connection due to fatal exception:
* 2025-10-14 04:01:36.223 **Timeout waiting for server to respond.**
. 2025-10-14 04:01:36.223 Closing connection.
< 2025-10-14 04:01:36.254 Script: Timeout waiting for server to respond.


. 2025-10-16 04:00:06.627 --------------------------------------------------------------------------

< 2025-10-16 04:00:06.627 Script: Searching for host...
. 2025-10-16 04:00:06.627 Looking up host "sftp.datapartner.endpoint" for SSH connection
. 2025-10-16 04:00:07.099 Connecting to 12.34.56.789 port 22
. 2025-10-16 04:00:07.114 Connected to 12.34.56.789
< 2025-10-16 04:00:07.114 Script: Connecting to host...
. 2025-10-16 04:00:07.114 We claim version: SSH-2.0-WinSCP_release_6.3.6
. 2025-10-16 04:00:07.114 Connected to 12.34.56.789
. 2025-10-16 04:00:23.557 Waiting for data timed out, asking user what to do.
. 2025-10-16 04:00:23.557 Asking user:
. 2025-10-16 04:00:23.557 **Host is not communicating for 15 seconds.
. 2025-10-16 04:00:23.557
. 2025-10-16 04:00:23.557 Wait for another 15 seconds?** ()
< 2025-10-16 04:00:23.557 Script: Host is not communicating for more than 15 seconds.
< 2025-10-16 04:00:23.557 Still waiting...
< 2025-10-16 04:00:23.557 Note: If the problem repeats, try turning off 'Optimize connection buffer size'.
< 2025-10-16 04:00:23.557 Warning: Aborting this operation will close connection!
. 2025-10-16 04:00:55.477 Data has arrived, closing query to user.
. 2025-10-16 04:00:55.477 Answer: OK
. 2025-10-16 04:00:55.477 Remote side unexpectedly closed network connection
. 2025-10-16 04:00:55.477 Knocking FTP port.
. 2025-10-16 04:00:57.827 FTP port did not open.
< 2025-10-16 04:00:57.827 Script: Server unexpectedly closed network connection.


Thanks,
James
martin

Re: Exit Status 0 After Connection Issues

Please post the logs.
JamesB

Exit Status 0 After Connection Issues

Hi,
I'm using WinSCP from the command line. We recently had issues with uploading files to an endpoint where their server allowed our connection but then could not continue due to issues on their end.

Both log files had "Waiting for data timed out, asking user what to do" after the "Connected to " the remote host IP address. One time the last message in the log file was "Script: Server unexpectedly closed network connection", the other time it was "Script: Timeout waiting for server to respond".

The business partner that receives these files acknowledged they were having some issues, and these problems appear to have been resolved.

My question is, why did WinSCP return a status 0 on exit when these issues happened? Neither log file included the normal "Script: Exit code 0" or "Session sent command exit status 0", but the application's exit status code was 0 so our check in the script did not alert us to the errors.

Thanks,
JamesB