Getting Periodic Exception calling "Check" with "0" argument(s): "Error transferring file Message

Advertisement

rsford31
Joined:
Posts:
32

Getting Periodic Exception calling "Check" with "0" argument(s): "Error transferring file Message

Hi,
I'm using $seession.FileExists to check for the existance of a remote file then if it exists I'm using $session.GetFiles followed by $transferResult.Check(). Periodically, I the transfer errs with:
Is the session open? True
File /path/path/somefile.ZIP exists at source.
Error: Exception calling "Check" with "0" argument(s): "Error transferring file '/path/path/somefile.ZIP'."
I'll re-run the process again and the transfer is successful.
I turned on logging and was able to capture the details. In the logs (attached) it says the following:
550 Command PORT failed
I'm assuming this is the cause of the issue? If so is there anything I can do to mitigate this? Let me know! Thanks so much for your time!
  • sessionlog.txt (8.16 KB, Private file)

Reply with quote

Advertisement

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

Re: Getting Periodic Exception calling "Check" with "0" argument(s): "Error transferring file Message

The problem is actually the previous error:
550 Command PASV failed

That usually happens when the server runs out of free ports in passive port range.
If you can change the FTP server configuration, allow wider port range there. Another solution is to decrease TIME_WAIT port interval.
If you cannot change the server configuration, the only workaround on WinSCP side is to decrease a transfer speed. Or use SFTP protocol, if available.

Reply with quote

rsford31

Re: Getting Periodic Exception calling "Check" with "0" argument(s): "Error transferring file Messag

Hi,
I'm still fighting with this with another vendor. The vendor at the source suggested that "the ‘550 PASV’ error should be allowed by your script so that it continues instead of failing". Is this even possible if a site is set up in the GUI and automation software is executing winscp.com and running a command file?

Reply with quote

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

Re: Getting Periodic Exception calling "Check" with "0" argument(s): "Error transferring file Messag

rsford31 wrote:

The vendor at the source suggested that "the ‘550 PASV’ error should be allowed by your script so that it continues instead of failing".
See https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
5xx Permanent Negative Completion reply
The command was not accepted and the requested action did not take place. The User-process is discouraged from repeating the exact request (in the same sequence)

If you want to repeat anyway, then you will have to code it. WinSCP won't do it for you.

Reply with quote

Advertisement

You can post new topics in this forum