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

cosb

I figured that much but I had to ask. If any suggestions or ideas come to your mind, please let me know.

If you were to implement it yourself, would you use the same session object for all configurations that access the same server? I am going to upgrade to the latest version of winscp.net and if the error persists, I will have to refactor the code and make it more efficient.

Thank you!

PS. I posted the original message as guest because the session expired and I didn't notice.
martin

Re: WinSCP.SessionRemoteException: Network error: Software caused connection abort

Hard to help here. I'd definitely try not to re-connect that frequently.
Guest

WinSCP.SessionRemoteException: Network error: Software caused connection abort

Hi,
I am trying to debug the error above and I cannot figure it out even though I enabled the session log.

Context:
My app: it is a windows service that runs scheduled jobs that look for files to upload/download to/from the same SFTP server. Each job processes in sequence a list of configurations that specify a download or an upload from or to a specific remote folder. The app opens & closes a session each time it processes each configuration. I know it is not the most efficient way to do it but I had my reasons and I am not worried about performance. After processing a number of configurations, I eventually get this exception on a configuration that tries to download files:
WinSCP.SessionRemoteException: Network error: Software caused connection abort
at WinSCP.SessionLogReader.Read(LogReadFlags flags)
at WinSCP.SessionElementLogReader.Read(LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForNonEmptyElement(String localName, LogReadFlags flags)
at WinSCP.CustomLogReader.WaitForGroupAndCreateLogReader()
at WinSCP.Session.WaitForGroup()
at WinSCP.Session.Open(SessionOptions sessionOptions)


  • The remote server is Cerberus FTP Server 12.3.4.0. I checked its log but there is nothing out of the ordinary.
  • The version of WinSCP is: 6.3.5 (Build 14991 2024-09-10).

I know it is not too much information, the code is pretty much run-of-the-mill. I also enabled the Session Logging but I cannot see anything out of the ordinary.

One question that I have – is it possible to get the error because there are multiple sessions to the same server at the same time from multiple threads?

Here are the lines from the session log file during one second when the failure above occurred.