Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS: FTP task - concurrent connections

I have created an SSIS package for downloading file from FTP server. When I debug the package, everything goes fine. But when I shedule the package as Job step, it sometimes fails to connect. The job is sheduled to repeat every 4 hours and in average every other run fails with Error: 0xC002918F - The Login request was denied.

The connection is anonymous and doesn't require password

I have tested it for a few hours now and found out some info:

  • When tested in FileZilla, I found out that the server denies second connection trying to download a file. Setting maximal number of concurrent connections to 1 got it working in FileZilla
  • FTP command in command line works fine. Maybe because it closes connection after every successful command
  • In FTP connection manager, I didn't found the option to limit number of connections

I have no possibility to see the settings of the FTP server. What confuses me the most is the fact, that some sheduled tasks work fine and some fail. I haven't found any regularity in it.

What I have tried so far:

  • Active/pasive mode
  • Limiting retries in FTP connection manager to 1
  • Shifting the shedule time, so it doesn't collide with any other (older) tasks trying to download from the server
  • Setting the FTP task to ASCII mode (The server says to FileZilla, that it only accepts ASCII characters)

No luck so far. Still some attemps success and some not.

EDIT:

The FTP server is on Simatic device.

For this week, i kept shedule for every 1 hour and kept pinging the device every 30 seconds. Still some SSID attempts don't succeed and ping goes through every time :-/

like image 702
DangeMask Avatar asked Apr 20 '15 07:04

DangeMask


People also ask

Does SSIS support SFTP?

The SFTP Task is an SSIS Control Flow task for remote file transfer and management.

How many connection managers are available in SSIS?

Figure 7 shows the SSIS package with the three Connection Managers defined.


2 Answers

I would replace the standard SSIS FTP Task with an Execute Process Task, and call WinSCP.

https://winscp.net/eng/docs/guide_automation

I've found WinSCP is much more reliable and flexible. You can pass it a command line built using expressions to cover all the functionality of the SSIS FTP task, and more.

like image 124
Mike Honey Avatar answered Oct 09 '22 23:10

Mike Honey


I think you have to accept just using a workaround in this scenario, maybe set the SQL agent SSIS job step to retry after an X seconds delay (advanced tab of SQL job step). We do this a lot when connecting to flaky cloud API's with SSIS.

Or maybe a for loop container in your package which continues on failure & breaks out on success - maybe try 3 times to connect?

Sorry if this is all obvious to you already.

like image 25
SinisterPenguin Avatar answered Oct 09 '22 23:10

SinisterPenguin