cancel
Showing results for 
Search instead for 
Did you mean: 

ftp adapter error

Former Member
0 Kudos

Hi!

I have configured an ftp adapter to ftp an external ftp server and pick a file. I get the following error.

An error occurred while connecting to the FTP server xxx.xxx.xxxx. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 520 Control connection prematurely closed by server'. For details, contact your FTP server vendor.

I use the following config

Connection Security FTPS(FTP Using SSL/TLS) for Control and Data Connection

Command Order AUTH TLS,USER,PASS,PBSZ,PROT

Can some one help to resolve this issue?

regards

Ramesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

What is the Connection mode set in the File adapters....

If it is set to Permanent and change it Per File Transfer and check the same

May be check any firewall connections blocking the transfer...??

Also try the mode as active instead of the passive...

Former Member
0 Kudos

Hi Vishal,

We have tried all the options. Only we are not sure whether it is a firewall issue from our end or it is something to do with misconfigurations from FTP server side which prevent us establishing SSL connection using Explicit SSL/TLS passive mode. Please see my details explanation in the thread. Hope this information will be usefull to identify the issue.

Ramesh

peter_wallner2
Active Contributor
0 Kudos

Hello  Ramesh Somashantha,

I know this was a while ago. I have a similar issue - How did you ever solve this?

thank you,

Peter

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Can you try the solution posted by Ravindra in this thread?

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Mark for the reply. We can access this ftp server using a filezila ftp client installed in a PC out side the PI server environment. Here I use the Implicit SSL/TLS connection using port 990. Explicit SSL/TLS connection doesn't work.

When I tried the same connection using filezilla client inside the PI server firewall environment I can't make a successful connection. We have monitored the firewall trafic and we can see one connection going through successfully. Hope this is the control conncetion. We can't see any second connection.

We have a similar type of connection to another partner within this firewall enviroment. When I use the same filezilla client to access that ftp server. Intiall I get the welcome message and then SSL certificate is downloaded and after accepting the certificate it list the directory. In the firewall we see two outgoing connections one before the download of the certificate and the other connection after I accept the downloaded certificate. Only difference I use Explicit SSL/TLS connection with port 1360.

For the above failed connection we use Implicit SSL/TLS as the partner use port 990. During this connection I don't see the SSL certificate downloading and in the firwall logs we see only the first connection going through.

Please see our FTP adapter settings and the FTP server settings below

FTP Adapter Settings

Port: 990

Data Connection: Passive

Command Security : FTPS(FTP Using SSL/TLS) for control and Data connection

Command Order : AUTH,TLS,USER,PASS,PBSZ,PROT

Conncetion Mode : Per file transfer

Use Passive Mode

Our firewall is opened for port 990 ( Do we need to open any other ports as per the FTP server config below)

Filezila FTP Server Setting

Genaral Settings

Listen on these ports : 2121

Number of threads : 2

IP Binding : FTP server IP

NO IP Filters set

Passive mode settings

Custom Port Range : 10000 - 20000

Don't use external IPs for local connection (Check)

Security Settings

Block incoming server to server transfer

Block outgoing server to server transfer

SSL/TLS settings

Enable FTP over SSL/TLS support (FTPS) u2013 This option is selected

Allow explicit FTP over TLS u2013 This box is selected

Disallow plain unencripted FTP u2013 This option is not selected

Forse PRPT P to encrypt file transfer in SSL/TLS mode u2013 This option is not selected

Listen for implicit SSL/TLS connection on the following ports : Port 990 is eneterd

Some question

Since we use Command order AUTH,TLS, hope FTP adapter use Explicit SSL/TLS connection. Am I right?

However our partner use port 990. This is for Implicit SSL/TLS connection (Can this be the issue?)

Whether PI FTP adapter can use Implicit SSL/TLS connection?

As per FTP log below it seems connection timed out before SSL connection established. Can this be some mis configurations in SSL/TLS settings of the FTP

server.

What port to be used to connect using Explicit SSL/TLS ?

Connected, sending welcome message...

(000084)25/11/2011 15:52:03 PM - (not logged in) (xxx.xx.xx.xxx)> 220-FileZilla Server version 0.9.40 beta

(000084)25/11/2011 15:52:03 PM - (not logged in) (xxx.xx.xx.xxx)> 220 Authorized users only

(000084)25/11/2011 15:54:03 PM - (not logged in) (xxx.xx.xx.xxx)> 421 Connection timed out.

(000084)25/11/2011 15:54:03 PM - (not logged in) (xxx.xx.xx.xxx)> disconnected.