KB Article #151981
external FTP server does not like List or Nlst command
-- external FTP pickup exchange can not get listing of files from server
-- error or timeout when LIST or NLST is attempted on partner FTP server
-- partner FTP sever has issue with our list directory command
-- keywords: ftpcommandset.xml, FTP, NLST, LIST, dir,
Resolution
Not all partner FTP servers support all FTP commands equally, that is why ftpcommandset.xml was created in the first place.
If you think you may have an issue with NLST or LIST not working as expected on one partners server, do the following.
1.
Turn either (or both) of these lines to debug in conf\log4j.properties
log4j.category.com.cyclonecommerce.tradingengine.transport.ftp=debug
log4j.category.com.cyclonecommerce.tradingengine.transport.ftp.SimpleDebug=debug
2.
Cause the issue again, and then look for the what list and what metacommand are at issue in the logs. Remember what metacommand to change. exmple:
METACOMMAND: flist
Sending: LIST
<some error>
or
METACOMMAND: list
Sending: NLST
<some error>
3. Backup, and then edit conf\filereg.xml
2. Find a like like the following, and copy it for use in step 4:
<File name="ftpcommandset.xml" path="conf/ftpcommandset.xml"/>
4. Add a new line like :
<File name="ftpcommandsetCustom.xml" path="conf/ftpcommandsetCustom.xml"/>
5. Backup, and then copy conf\ftpcommandset.xml to a new file conf\ftpcommandsetCustom.xml
6. Edit conf\ftpcommandsetCustom.xml and find the <list> or <flist> section.
7. Go to the bottom of the metacommand section you need to change and replace the .List line with the .Nlst line (or vice versa). (you can find both the List and Nlist lines close by, copy and paste the one you need) example:
<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Nlst" type="data"/>
8. In the UI, go to the external FTP pickup or delivery exchange in question, edit it, go to the Advanced tab, and update the default ftpcommandset.xml file with the one you created and named in filereg.xml. Save exchange point.
9. Note, a restart is probably required for new filereg.xml and command set to be found.