[SOLVED] Winscp .Net assembly - Error transferring file

Advertisement

glannes
Joined:
Posts:
9

[SOLVED] Winscp .Net assembly - Error transferring file

Hello,

We receive files on our system , rename it and send through SFTP using WinSCP .NET assembly. We use WinSCP in a PowerShell script.

Sometimes when we received two files in the sametime, we have this error message:
'SourcePath'. Copying files to remote side failed. Can't open data connection for transfer of "/FILENAME_date_hours""

Do you have any idea that what is happened ?

Regrds,
Last edited by glannes on 2021-02-03 16:09; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Winscp .Net assembly - Error transferring file

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

glannes
Joined:
Posts:
9

Winscp .Net assembly - Error transferring file

Hello Martin,
I will post you the session log when the problem occurs again.
Is there a risk of having a message like "process used" if the log session is called several times at the same time?
Regards

Guillaume

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp .Net assembly - Error transferring file

If you run multiple processes in parallel, each should log to an unique log file.

Reply with quote

glannes
Joined:
Posts:
9

Winscp .Net assembly - Error transferring file

Hello,
Please find the log generated by the SessionDebugLog.
Could you help me to understand why it failed?
Regards,
  • winscpFODLE00400002_10122020_9323065.log (101.71 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Winscp .Net assembly - Error transferring file

I was asking for Session.SessionLogPath. You have posted Session.DebugLogPath.

Reply with quote

glannes
Joined:
Posts:
9

Winscp .Net assembly - Error transferring file

Hello ,

Please see the error file
  • winscpFODLE00400003_07012021_9330248.log (9.14 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp .Net assembly - Error transferring file

I have asked for Session.SessionLogPath, you have posted Session.DebugLogPath (there's no SessionDebugLog).

Reply with quote

Advertisement

glannes

Re: Winscp .Net assembly - Error transferring file

What??? no it's session LogPath. Could you share me what do you see in the file ?

In the file, i have PASV line , Port line etc..

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Winscp .Net assembly - Error transferring file

Sorry, my mistake, I was reading your old posts.

It might be a firewall issue. Your server has some problems with the passive mode, so WinSCP falls back to the active mode. You might not have all the active mode ports open in your local firewall. See https://winscp.net/eng/docs/ftp_modes#active
Though better would be to get your FTP server fixed to support the passive mode.

Reply with quote

martin
Site Admin
martin avatar

Re: Winscp .Net assembly - Error transferring file

Both. The passive mode problem is on the remote side.
And the active mode problem is probably on your side.

Reply with quote

Advertisement

glannes
Joined:
Posts:
9

[SOLVED] Winscp .Net assembly - Error transferring file

Hello,
For your information,
the problem was in the remote side. It was a router badly dimensioned and constantly at 100% CPU that can cause IP losses.
Thanks a lot for your help
Have a nice day

Reply with quote

Advertisement

You can post new topics in this forum