cancel
Showing results for 
Search instead for 
Did you mean: 

FTP exception: Can't open passive connection: Permission Denied

Former Member
0 Kudos

I have a File sender adapter, with FTP as transport protocol.

The adapter polls a directory each 60 seconds.

All works perfectly but <b>sometimes</b> I get the following error :


Channel CC_GBL_FlatFileSender: Error connecting to ftp server ...: com.sap.aii.adapter.file.ftp.FTPEx: 425 Can't open passive connection: Permission denied.

And 60 seconds after, no more error.

Any idee of why I get this error occasionally ?

In the sender file adapte, data connection is set to Passive. Do I have to set it to Active ?

Thanks in advance,

Laurence

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Hi Laurence,

Not an exact solution but u need to check out a few things

Up to and including SP14, the File Adapter exclusively uses passive data connections. Starting with SP15, active connections will be available.

The 425 error means that the data channel is blocked or closed between you and the server you are trying to connect to.

For Active connections open ports 20 and 21

For Passive connections open ports 21 and 1024+ (and higher)

Also, turn off command filtering on the firewall.

If you still cannot get a successful connection, check all devices that are between the client and server to ensure that the proper ports are open (e.g. routers)

Just an add on

http://slacksite.com/other/ftp.html

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Thanks for the information. The link http://slacksite.com/other/ftp.html is very interesting.

Needed ports are already opened because the FTP connection works nearly at every time : maybe 1 exception every week whereas there is a connection every 60 seconds.

Kind regards,

Laurence

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Data Connection

- Active

In active mode, the server establishes a data connection from its data port, port 20, to an end point chosen by the client.

- Passive

In passive mode, the client establishes a data connection to the port required by the server.

The default setting is a passive data connection. Only change this setting if you have a specific reason. This is what is recommended by SAP.

It is possible that Passive FTP mode may terminate session.

In this mode the server "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.

In the FTP protocol two ports are normally used, 20 and 21.

Port 21 is the control channel in which requests such as PUT, GET, and PWD are sent to the server.

Port 20 is the data channel in which actual files, folders and directory

listings are sent.

Normally, when you connect to an FTP site, the site establishes the data

connection to your PC (the client) on Port 20. However, if the site allows

passive transfers, you can have your PC establish the data connection. It is

recommended that you use passive mode for most transfers.

Regards

Sumit Jain

**Reward with points if you find it useful.

Former Member
0 Kudos

Hi Laurence,

Its not necessary but believe it depends upon how FTP server has been configured. If FTP server has been configured such that it accepts only Active Data connection then it need to be active. Try changing the mode to "Active" if it works, else please provide details of your adapter configuration.

Regards

Prashant

Former Member
0 Kudos

The FTP server accepts passive data connection, and adapter configuration is the following :

Data Connection : Passive

Timeout (secs) :

Connections Security : None

Connect Mode : Permanently

Transfer Mode : Text

Kind regards,

Laurence

Former Member
0 Kudos

HI,

Are you using IIS FTP Server.

see SAP Note 821267:FAQ: XI 3.0 File Adapter : Q No 13.

Regards

Chilla

Former Member
0 Kudos

Not using IIS, and the problem arrived also when there is no file in the directory to poll.

Regards,

Laurence