Connection fails randomly. 425 Cannot open data connection. 501 Server cannot accept argument.
I use a winscp script to retreive files from a FTP in a SSIS-package.
The package contains a loop that in each "lap" gets a file using winscp.
The problem is that it fails randomly (to me that is). It can go trough the loop 20 times, picking up files but then fails on the 21st.
Sometimes it picks up one and then fails at the second.
Log below:
. 2015-10-15 15:55:49.238 Copying "/Extract/MailingList_8377267.csv" to local directory started.
. 2015-10-15 15:55:49.238 Binary transfer mode selected.
. 2015-10-15 15:55:49.238 Starting download of /Extract/MailingList_8377267.csv
> 2015-10-15 15:55:49.238 TYPE I
< 2015-10-15 15:55:49.285 200 Type set to I.
> 2015-10-15 15:55:49.285 PASV
< 2015-10-15 15:55:49.332 227 Entering Passive Mode (62,216,253,139,193,45).
> 2015-10-15 15:55:49.332 RETR MailingList_8377267.csv
< 2015-10-15 15:55:49.379 150 Opening BINARY mode data connection.
. 2015-10-15 15:55:49.426 Session ID reused
. 2015-10-15 15:55:49.426 TLS connection established
< 2015-10-15 15:55:52.865 226 Transfer complete.
. 2015-10-15 15:55:52.865 Download successful
. 2015-10-15 15:55:52.865 Transfer done: '/Extract/MailingList_8377267.csv' [18706119]
. 2015-10-15 15:55:52.865 File: '/Extract/MailingList_8377269.csv' [2015-10-06T13:39:00.000Z] [917904]
. 2015-10-15 15:55:52.865 Copying "/Extract/MailingList_8377269.csv" to local directory started.
. 2015-10-15 15:55:52.865 Binary transfer mode selected.
. 2015-10-15 15:55:52.865 Starting download of /Extract/MailingList_8377269.csv
> 2015-10-15 15:55:52.865 TYPE I
< 2015-10-15 15:55:52.896 200 Type set to I.
> 2015-10-15 15:55:52.896 PASV
< 2015-10-15 15:55:52.959 227 Entering Passive Mode (62,216,253,139,193,46).
> 2015-10-15 15:55:52.959 RETR MailingList_8377269.csv
< 2015-10-15 15:55:53.006 150 Opening BINARY mode data connection.
. 2015-10-15 15:55:53.037 Session ID reused
. 2015-10-15 15:55:53.037 TLS connection established
< 2015-10-15 15:55:53.427 226 Transfer complete.
. 2015-10-15 15:55:53.427 Download successful
. 2015-10-15 15:55:53.427 Transfer done: '/Extract/MailingList_8377269.csv' [917904]
. 2015-10-15 15:55:53.427 File: '/Extract/MailingList_8377275.csv' [2015-10-06T13:42:00.000Z] [1207004]
. 2015-10-15 15:55:53.427 Copying "/Extract/MailingList_8377275.csv" to local directory started.
. 2015-10-15 15:55:53.427 Binary transfer mode selected.
. 2015-10-15 15:55:53.427 Starting download of /Extract/MailingList_8377275.csv
> 2015-10-15 15:55:53.427 TYPE I
< 2015-10-15 15:55:53.474 200 Type set to I.
> 2015-10-15 15:55:53.474 PASV
< 2015-10-15 15:55:53.521 425 Cannot open data connection.
> 2015-10-15 15:55:53.521 PORT 172,16,38,15,195,48
< 2015-10-15 15:55:53.552 501 Server cannot accept argument.
. 2015-10-15 15:55:53.552 Copying files from remote side failed.
* 2015-10-15 15:55:53.552 (ExtException) **Copying files from remote side failed.**
* 2015-10-15 15:55:53.552 Server cannot accept argument.
. 2015-10-15 15:55:53.552 Asking user:
. 2015-10-15 15:55:53.552 Error transferring file '/Extract/MailingList_8377275.csv'. ("Copying files from remote side failed.","Server cannot accept argument.")
< 2015-10-15 15:55:53.552 Script: Error transferring file '/Extract/MailingList_8377275.csv'.
< 2015-10-15 15:55:53.552 Script: Copying files from remote side failed.
< 2015-10-15 15:55:53.552 Server cannot accept argument.
* 2015-10-15 15:55:53.552 (EScpSkipFile) Error transferring file '/Extract/MailingList_8377275.csv'.
* 2015-10-15 15:55:53.552 Copying files from remote side failed.
* 2015-10-15 15:55:53.552 Server cannot accept argument.
. 2015-10-15 15:55:53.552 Script: Failed
. 2015-10-15 15:55:53.552 Script: Exit code: 1
. 2015-10-15 15:55:53.568 Disconnected from server
Thanks in advance!