BizTalk 2013 R2 SFTP Adapter – SftpException

Posted: August 24, 2017  |  Categories: BizTalk
Tags: SFTP
SFTP Adapter Issues

A new BizTalk 2013R2 SFTP adapter receive location exhibits the following;

  1. The event log shows many warning like “The adapter “SFTP” raised an error message.”Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Unable to initialize SFTP connection. Ensure that the specified server’s configuration details are correct”.
  2. Some files stick in the SFTP folder.
  1. The BizTalk Server 2013 R2 is patched to CU6 but is missing the SSO patch KB3062831.
  2. The SFTP adapter receive adapter polls the receive location  every 5 minutes.
  3. The SFTP adapter picks up stuck files after stopping and starting the receive location.
Attempted mitigation

Firstly, the event log warning disappears on decreasing the polling interval from 5 minutes to the default of 5 seconds.   Unfortunately now a new warning appears  in the event log (shown below) and some files still stick in the SFTP folder.

The WCF service host at address “s*.*” has faulted and as a result no more messages can be received on the corresponding receive location. To fix the issue, BizTalk Server will automatically attempt to restart the service host.

Secondly, the SSO patch was applied and a scheduled task that stops and starts the receive location every 60 minutes finally solves the stuck file issue. See this post for the PowerShell script that completes this action.


Stopping and starting the SFTP location solves the issue of files being stuck in the SFTP folder but the event log is still full of warnings about the SFTP faulting. I think this solution is a bit lame but it is the only thing that works for me at the moment. In a previous post I recommend to not set the SFTP adapter polling interval to default of 5 seconds but I now retract that recommendation.

I can hardly wait until we upgrade to BizTalk 2016 to see if this issue is solved. In meantime if anyone has any idea how to get rid of the SFTP adapter warning above please let me know.

Postscript 24/01/2019

I upgraded to BizTalk 2016 CU5 and this has solved this issue.

#1 all-in-one platform for Microsoft BizTalk Server management and monitoring

Back to Top