The Messaging Engine failed to add a receive location "<Rcv.Loc.Name>" with URL "sftp://<URI>" to the adapter "SFTP". Reason:"Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: List remote directory error


The induction of an out-of-the-box SFTP adapter in BizTalk 2013 was a heartening change as customers had been leveraging on third party solutions all these years with their own set of shortcomings. Additionally none of them were officially supported by Microsoft which could make matters worse especially if you needed to troubleshoot adapter specific errors. This time Microsoft realized the importance to come up with a home-grown solution given the large number of users across the globe whose business data rely on SFTP servers at large.

That said, any infant feature has its share of limitations and SFTP adapter is no exception. Unfortunately, SFTP adapter has no tracing or logging capabilities which could prove tricky in certain troubleshooting scenarios. (The tracing feature might make its way to the adapter in future releases of BizTalk or its cumulative updates – Just wishful thinking!) 

Ever since the release of BTS 2013, Microsoft has been gathering intel on SFTP related errors. We have most of it documented, some of them fixed and some yet to be tested. The “List remote directory error” is an interesting one of the lots. Even more interestingly, this could be thrown in a variety of scenarios at the receive side. 

  • The very first thing I’d check would be the QFE Microsoft released specifically to address SFTP adapter related errors. It apparently fixes most of the known errors and could make life much easier for a BizTalk – SFTP patron. You can open a support case with Microsoft and request for this fix if you don’t have it already and the BizTalk Server version is 2013 or 2013 R2. I have seen this error being fixed by the QFE in a couple of environments. This will be part of the upcoming CU for the corresponding BizTalk versions.
  • Increase the polling interval: By default, the polling interval for SFTP adapter at receive has been set to zero. This could be too abusive for some SFTP servers in high volumetric environments whose concurrent connections are limited for a certain port. Try increasing the parameter to a higher value and it could change your day. 

     

  • Review the folder path: Now, this may sound trivial but it can get the receive location to behave wacky at times. Some SFTP servers need an additional “/” to distinguish the remote path. I had the error thrown for “Folder/SubFolder” whereas it perfectly worked for “/Folder/SubFolder” whereas it perfectly worked for “/Folder/SubFolder

            This is totally a SFTP server specific behavior and in most cases the adapter gets victimized. 

  • Check the SFTP credentials: SFTP inherently supports Public key, Password, Host-based and keyboard authentication modes. In a basic or public key based communication, an invalid / expired username-password combination / certificate could also throw this error loud and clear. Make sure to pre-validate your SFTP credentials using a SFTP explorer utility such as FileZilla or WinSCP before applying those at the receive locations. 

 

Written By
Rajkumar Damodaran

Reviewed By
Shailesh Agre

Microsoft GTSC India

Comments (2)

  1. Indul Hassan says:

    Thanks for the post

  2. Subin Thomas says:

    we are getting the “List remote directory error” , can you guide on how to download the QFE Microsoft released specifically to address SFTP adapter related errors

Skip to main content