BW throws error:Cannot perform FTP Operation: DIR. Error Info: Unexpected reply code. Returned Code: 226. Detail Description: Transfert termin¿. Expected Code: 125,150.

BW throws error:Cannot perform FTP Operation: DIR. Error Info: Unexpected reply code. Returned Code: 226. Detail Description: Transfert termin¿. Expected Code: 125,150.

book

Article ID: KB0079548

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 5.x

Description

When using "FTP Dir" activity for FTP server with NLST checked, where the directory is empty (no files),  BW seems to throw below error message:
caused by: Unexpected reply code. Returned Code: 226. Detail Description: Transfer complete. Expected Code: 125,150.

On all the other platforms this seems to work fine but problem faced only at AIX machine.

This issue is caused by different behavior with "NLST" command on the FTP Server Side when the directory is empty.

With "NLST" checked in designer, BW will use "NLST" command instead of LIST command to query the directory of ftp server. But when the directory is empty on server side, the server behavior is vary. 
Some server may respond with an empty list, while some reply with "No such file or directory." as this is the case where above mentioned error reported in BW application log.
 

Issue/Introduction

When using "FTP Dir" on FTP server with NLST checked, where the directory contains no files, BW seems to throw "caused by: Unexpected reply code. Returned Code: 226. Detail Description: Transfer complete. Expected Code: 125,150.".The workaround is you need to uncheck the 'NLST' option available on FTP DIR activity.

Environment

AIX

Resolution

As this is a server side behavior we do not have any control over it.  You need to un-check the 'NLST' option available on FTP DIR activity.