SFTP Adapter Issues
A new BizTalk 2013R2 SFTP adapter receive location exhibits the following;
- 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”.
- Some files stick in the SFTP folder.
- The BizTalk Server 2013 R2 is patched to CU6 but is missing the SSO patch KB3062831.
- The SFTP adapter receive adapter polls the receive location every 5 minutes.
- The SFTP adapter picks up stuck files after stopping and starting the receive location.
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 “sftp://ftp.problem.com:22/out//*.*” 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.