This project has moved and is read-only. For the latest updates, please go here.

SFTP adapter appears to hang all of a sudden and temp file sometimes gets stuck in SFTP Remote temp folder

Nov 3, 2009 at 8:24 AM


wondering if anyone encountered this problem before, our setup consists of sending files from one server at Location A to the other server at Location B through a BizTalk orchestration using SFTP. One of the orchestration consists of an SFTP adapter which is polling on a receive location on the SFTP server.

The problem that we are facing is that the SFTP adapter appears to hang all of a sudden. There is no error message and no error in the event log, which says that the SFTP adapter has stopped working. But in actual fact, files were there at the SFTP receive location and the SFTP adpater was not picking them up. This same SFTP adapter was able to poll for the files and pick them up with no problem originally and no changes was done to the setup. It just stopped working with no error. So everyone thought from the BizTalk admin console, there was no problem with the adapter, it was not disabled, no error msg, the only problem was that the files were not being picked up from the outgoing receive location. The solution we have to fix this is when we discover the files are not being picked up by the adapter, we would just restart the host instance and then the SFTP adapter is able to resume the polling and will pick up the file. Wonder if this is a known problem? and if so, any suggestions on fixing this?

Another problem which we face is when we use the SFTP remote temp path folder, sometimes I notice that our temp file that gets written here gets stuck here and it is not moved automatically to the final SFTP remote path folder. Not sure if this is already a known problem? or is it some permissions problems? but one thing to note that this problem doesn't happen all the time and is intermittent. So i should think it is not a password/permissions problem.

Any help / comments would be greatly appreciated.




Nov 26, 2009 at 12:02 AM

Sorry for the late response.

Would you be able to varify a few things?

  1. Do you need to restart the host instance, or is restarting the location enough? (it would still not be acceptable, put it would point to the direction of the problem)
  2. Would you mind running a trace view, as the adapter is not picking up any messages. Use debugviewer, enable "Capture32" and make sure to enable Tracing on the adapter config.
  3. What ssh server are you running?


Feb 8, 2010 at 12:47 PM


I am having the same problem as hwpor where my receive location polls an SFTP server. It works for a while (retrieving files) and after a couple days the adapter just stops polling and hangs. I dont see any error messages or traces of anything indicating what could have gone wrong. The workaround to this problem is simply to restart the receive location (dont even have to restart the host instance).

I will post back the next time I can replicate the bug with the result of the trace view you suggested.



Feb 13, 2010 at 6:51 PM

Hi David,

would you mind running Debug view, to verify if there are any activity on the receiveport?


Mar 25, 2010 at 2:16 AM

We have the same issue. We have several receive and send locations in production.

From time to time one of the receive locations would just hang. Out MOM monitoring can't pick this problem up because there is no error generated in error log. So this is quite an issue.

We also have hanging problem with send location in development environment as well.

Since it is impossible to monitor this error it has quite severe consequences for our business.

Mar 25, 2010 at 12:17 PM

It would be of great help if either of you could give me some trace info. To do that, enable trace on your send of receive port. Download and start DebugView. In the Capture menu, enable Capture Win32.



Jun 21, 2010 at 10:20 AM

Hi Mikael, we are having problems capturing the trace using DebugView, because of access restrictions in our environment.

We have still encountered cases whereby the SFTP adapter just appears to hang and files are not being picked up by the receive location. Only if we refresh the host instance, that the SFTP adapter appears to resume its polling and the files are being picked up.

Is it alright if we add some more logging in the adapter to write to another log file (perhaps using log4net to track the adapter status) when the adapter is polling the receive location?

Then we plan to monitor the log file's status to see if the files are being picked up from that particular receive location. If log file status doesn't change (i.e. the files are not being picked up by the SFTP adapter), we will refresh the host instance.

Hope we can get your advice on this.



Jul 7, 2010 at 9:47 PM
We've seen a similar behavior on a customer environment, and are collecting the trace data from this environment. I'll keep you updated. //Mikael
Jul 18, 2010 at 3:23 PM

Hi Mikael,

Any updated information?



Jul 20, 2010 at 5:39 PM
Ï'd suggest you try the 1.3.6 version, and perhaps disable the connection pool. hth //Mikael
Apr 11, 2011 at 9:32 PM


We are experiencing the same problem with the adapter. The problem occurs in only one of our environments. We are using version 1.3.4 and connection pooling is not activated on our server. Upgrading is an option but we would rather avoid it... Before upgrading I would like to know how likely it is to solve the problem?

We are using BizTalk 2009

Here is the output found in debugview when we run the receive location :

00000000    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void .ctor()    
00000001    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Initialize(System.String)    
00000002    4:00:28 PM    [2664]   adapterGuid={b4f8c77d-08c9-4b82-9922-abb646654deb}    
00000003    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String SetConfigurationUri(System.String, System.String)    
00000004    4:00:28 PM    [2664]   configuration=***CONFIDENTIAL***    
00000005    4:00:28 PM    [2664]   uri=SFTP://xxxxxxxxxxx/*.out    
00000006    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String ValidateConfiguration(Microsoft.BizTalk.Adapter.Framework.ConfigType, System.String)    
00000007    4:00:28 PM    [2664]   configType=ReceiveLocation    
00000008    4:00:28 PM    [2664]   configuration=***CONFIDENTIAL***    
00000009    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void ReadAdapterInfoFromRegistry()    
00000010    4:00:28 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Instantiate()    
00000011    4:00:28 PM    [2664]   adapterName=Blogical.Shared.Adapters.Sftp v1    
00000012    4:00:28 PM    [2664]   assemblyFile=D:\Program Files (x86)\Blogical\Blogical.Shared.Adapters.Sftp\Blogical.Shared.Adapters.Sftp.Management.dll    
00000013    4:00:28 PM    [2664]   typeName=Blogical.Shared.Adapters.Sftp.Management.StaticAdapterManagement    

00000332    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void .ctor()    
00000333    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Initialize(System.String)    
00000334    4:02:27 PM    [2664]   adapterGuid={b4f8c77d-08c9-4b82-9922-abb646654deb}    
00000335    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String SetConfigurationUri(System.String, System.String)    
00000336    4:02:27 PM    [2664]   configuration=***CONFIDENTIAL***    
00000337    4:02:27 PM    [2664]   uri=SFTP://xxxxxxxxxxxxxx/*.out    
00000338    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String ValidateConfiguration(Microsoft.BizTalk.Adapter.Framework.ConfigType, System.String)    
00000339    4:02:27 PM    [2664]   configType=ReceiveLocation    
00000340    4:02:27 PM    [2664]   configuration=***CONFIDENTIAL***    
00000341    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void ReadAdapterInfoFromRegistry()    
00000342    4:02:27 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Instantiate()    
00000343    4:02:27 PM    [2664]   adapterName=Blogical.Shared.Adapters.Sftp v1    
00000344    4:02:27 PM    [2664]   assemblyFile=xxxxxxxxxxx\Blogical\Blogical.Shared.Adapters.Sftp\Blogical.Shared.Adapters.Sftp.Management.dll    
00000345    4:02:27 PM    [2664]   typeName=Blogical.Shared.Adapters.Sftp.Management.StaticAdapterManagement    
00000346    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void .ctor()    
00000347    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Initialize(System.String)    
00000348    4:02:42 PM    [2664]   adapterGuid={b4f8c77d-08c9-4b82-9922-abb646654deb}    
00000349    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String SetConfigurationUri(System.String, System.String)    
00000350    4:02:42 PM    [2664]   configuration=***CONFIDENTIAL***    
00000351    4:02:42 PM    [2664]   uri=SFTP://xxxxxxxxxxxxx/*.out    
00000352    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String ValidateConfiguration(Microsoft.BizTalk.Adapter.Framework.ConfigType, System.String)    
00000353    4:02:42 PM    [2664]   configType=ReceiveLocation    
00000354    4:02:42 PM    [2664]   configuration=***CONFIDENTIAL***    
00000355    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void ReadAdapterInfoFromRegistry()    
00000356    4:02:42 PM    [2664] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Instantiate()    
00000357    4:02:42 PM    [2664]   adapterName=Blogical.Shared.Adapters.Sftp v1    
00000358    4:02:42 PM    [2664]   assemblyFile=xxxxxxxxxxx\Blogical\Blogical.Shared.Adapters.Sftp\Blogical.Shared.Adapters.Sftp.Management.dll    
00000359    4:02:42 PM    [2664]   typeName=Blogical.Shared.Adapters.Sftp.Management.StaticAdapterManagement   

Jan 25, 2012 at 2:06 PM

Hi There,

I have recently installed the 1.4 version fo the Adapter on a BizTalk 2010 Server running on Windows 2008 R2 and am experiencing the same problems as reported here above. I recompiled the source in Visual Studio 2010 .Net 4 to recreate the installer.

Sending files to the SFTP server works perfectly.

The receive location doesn't seem to always see the files as specified by the file mask even though they are available on the SFTP server. No error is generated, it just says Found 0 files. Restarting the host instance (64bit) and/or the Receive location did not help the situation. I disbaled the receive location and enabled it after about an hour and then the adapter did pick up the files as expected.

The debug logging I am getting looks like this:

[8852] MMCTraceSoruce Information: 2 :
[8852] ###PERF READING### ###SCENARIO: SFTP-BlogicalRcvLocation OnEnable
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void .ctor()
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Initialize(System.String)
[8852]   adapterGuid={b4f8c77d-08c9-4b82-9922-abb646654deb}
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String SetConfigurationUri(System.String, System.String)
[8852]   configuration=***CONFIDENTIAL***
[8852]   uri=SFTP://mysftp-server:22/out/*.txt
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: System.String ValidateConfiguration(Microsoft.BizTalk.Adapter.Framework.ConfigType, System.String)
[8852]   configType=ReceiveLocation
[8852]   configuration=***CONFIDENTIAL***
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void ReadAdapterInfoFromRegistry()
[8852] Microsoft.BizTalk.Adapter.Framework.Forms.AdapterProxy: Void Instantiate()
[8852]   adapterName=Blogical.Shared.Adapters.Sftp v1
[8852]   assemblyFile=C:\Program Files (x86)\Blogical\Blogical.Shared.Adapters.Sftp\Blogical.Shared.Adapters.Sftp.Management.dll
[8852]   typeName=Blogical.Shared.Adapters.Sftp.Management.StaticAdapterManagement
[8852] MMCTraceSoruce Information: 2 :
[8852] ###PERF READING### ###SCENARIO: SFTP-BlogicalRcvLocation OnEnable### ###Time(ms): 1002###
[8852] MMCTraceSoruce Information: 2 :
[8852] ###PERF READING### ###SCENARIO: SFTP-BlogicalRcvLocation Refresh
[8852] ###PERF READING### ###SCENARIO: SFTP-BlogicalRcvLocation Refresh### ###Time(ms): 1077###
[16632] [SftpReceiverEndpoint] ControlledTermination.Enter()
[16632] [SftpReceiverEndpoint] PickupFilesAndSubmit called [SFTP://mysftp-server:22/out/*.txt]
[16632] [SftpConnectionPool] Connecting to mysftp-server
[16632] [SftpReceiverEndpoint] Dir(out/*.txt)
[16632] [SftpReceiverEndpoint] Found 0 files.
[16632] [SftpConnectionPool] Disconnecting from mysftp-server
[16632] [SftpReceiverEndpoint] ControlledTermination.Leave()
[16632] [TimeSchedule]Executing GetNextActivationTime
[16632] [SftpReceiverEndpoint] ControlledTermination.Enter()
[16632] [SftpReceiverEndpoint] PickupFilesAndSubmit called [SFTP://mysftp-server:22/out/*.txt]
[16632] [SftpConnectionPool] Connecting to mysftp-server
[16632] [SftpReceiverEndpoint] Dir(out/*.txt)
[16632] [SftpReceiverEndpoint] Found 0 files.
[16632] [SftpConnectionPool] Disconnecting from mysftp-server
[16632] [SftpReceiverEndpoint] ControlledTermination.Leave()
[16632] [TimeSchedule]Executing GetNextActivationTime

While I have a *.txt file in the out directory specified.



Feb 23, 2012 at 11:19 AM

Hi HW .. I am seeing the same issues in the 1.4 version of the adapter. Have just started setting up a trace and some structured testing of this. 

Did you ever get your problem fully solved, or did you find a way to work around it? 

May 18, 2012 at 3:29 AM

It has been quite a while, I just want to ask if anybody has solved this problem or know what is causing it?

Jul 31, 2012 at 12:41 PM

Hi, I had this same issue and fixed it by updating the Tamir SSH library.  Have a look at patch ID 12554 here and see if it helps you out too.

Aug 19, 2013 at 8:49 AM
We have same issue , however we installed the latest version 1.4 and update the code of the the Tamir SSH library in patch id 12554.

Nov 25, 2013 at 8:26 AM

Please see release v1.5.0 which resolves various send/receive stability issues.