cancel
Showing results for 
Search instead for 
Did you mean: 

An error occurred while connecting to the FTP server (IDOC to File Scenario)

chandravadanj
Explorer
0 Kudos

Hi All,

I am facing the following error in communication channel monitoring for receiver FTP (IDOC to FILE scenario) in PI 7.3.

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server 'XX.XX.XXX.XXX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 425 Unexpected reply codeFailed to establish connection.'. For details, contact your FTP server vendor.

For the same interface, 2nd issue is that we have some .tmp files got created on the FTP server in the specified directory.

Please advise.

Thanks,

Chandravadan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandravadan,

Contact your FTP team, there is some connection issue/ down or might a network issue.

when there is no connection or network issue, it is possible for an interface to create files on the FTP directory. This might be some other issue.

Check the ,tmp file and revert back with your observations.

chandravadanj
Explorer
0 Kudos

Hi Hanumantha,

Thanks for the reply.

The .tmp files are empty (Zero bytes).

When I changed value from 'Use Temporary File' to 'Directly' in the Processing parameters tab for the Input value of "Put File" in the communication channel for this interface. Then we re-ran the interface and another file got created with the expected output file name with the extension .XML and not the .tmp this time but still it is empty.

My query is that since the PI is able to create an empty file on the FTP Server, it means it is able to connect with the FTP Server using the credentials provided in the communication channel. Why there is no data in the output file and I am still getting the same error in the communication channel monitoring for this interface which I have mentioned in my original question.

Please advise.

Thanks,

Former Member
0 Kudos

Hi Chandravan,

This indicates that the FTP connection is fine.

When it is able to create the files on the FTP Directory with empty files then there is some issue with your mapping.

Perform a mapping test in Message Mapping and check whether it is able to create the target XML.

chandravadanj
Explorer
0 Kudos

Yes, Hanumantha!

I tested in the message mapping using the Input payload and it is able to create the target XML.

Not sure what could be the problem as I am still getting the below error in the communication channel monitoring and the empty file is getting created on the FTP:

Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: An error occurred while connecting to the FTP server 'XX.XX.XXX.XXX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 425 Unexpected reply codeFailed to establish connection.'. For details, contact your FTP server vendor.

Thanks,

Former Member
0 Kudos

Check with the your FTP team, that the user provided  has access to place data in the FTP folder.

Because, if though the user has the authorization to connect to FTP might not have authorization to place the message/data in FTP.

Answers (3)

Answers (3)

chandravadanj
Explorer
0 Kudos

Thanks Everyone! It was a FTP side issue. FTP team did some changes at their end and then we were able to send the XML correctly to FTP Server.

former_member190624
Active Contributor
0 Kudos

Hi Chandravadan,

Check  FTP login credentials are correct (i.e, user and password ) or ftp user got locked bcz of wrong credentials as your basis or FTP team to unlock the user .

Regards

Hari.

chandravadanj
Explorer
0 Kudos

Hi Hari,

We are able to connect to the FTP Server using the FileZilla which means the user is not locked.

Thanks,

Former Member
0 Kudos

Hi Chandravadan,

Maybe it's an issue between the PI server and the FTP server? Ask PI Basis to try manually ftp'ing a file from OS Level (Unix - if that's what you are using) on the PI server to the FTP server and see the result.

FTP return code 425 means unable to open data connection, it's an FTP standard code.

How have you configured your FTP receiver, i.e. per file transfer / permanently, data connection (active / passive) - try swopping this setting.

Regards, Trevor

iaki_vila
Active Contributor
0 Kudos

HI Chandravan,

This error is a problem in the connection, it isn't an authorization error then may be the PI can't see the FTP server. Are you PI or the FTP behind a firewall?, your basis team should test connection with the port 21 with a shell command and to open the 21 port.

Regards.