none
Initialize error for SFTP adapter in BizTalk 2013 R2 RRS feed

  • Question

  • Hi There.

    Upgrading our BizTalk servers from 2009 to 2013 we also replace al bLogical sftp ports with the new sftp adapter included in the in bts 2013 R2. 

    This has worked fine so far, but for one server we get a strange problem. when trying to connect our receive location fails with the following error message:

    The Messaging Engine failed to add a receive location "TestReceive_SFTP" with URL "sftp://ftp1.dummyServer.com:22/*.txt" to the adapter "SFTP". Reason: "Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Unable to initialize SFTP connection. Ensure that the specified server's configuration details are correct.
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.Open()
       at Microsoft.BizTalk.Adapter.Sftp.SftpConnection.OpenUnderlyingConnection(SftpConnectionProperties connectionProperties)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.ConnectionPool`3.GetConnection(T1 connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.GetConnection(T connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.ValidateConfiguration(SftpReceivePropertyBag receivePropertyBag)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.CreateBinding(RHConfig rhConfig)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnBeginOpen()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url, IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)".

    (Note, I replaced the actual ftp server address with dummyServer.com)

    I have testet the connection of course and both filezilla and winSCP connects without problem, as does blogicals codeplex sftp adapter in our old rigg.

    The problem is reproducable and occurs both in staging and on my local development image. 

    Here are some server properties I got from winSCP which might be significant:

    File transfer protocol = SFTP-3
    Cryptographic protocol = SSH-2
    SSH implementation = WingFTPserver
    Encryption algorithm = aes
    Compression = No

    Initially I used Accept Any SSH Server Host Key to True, but have tried setting it to false with server host key:

    SSH Server Host Key Finger Print:

    ssh-rsa 2048 1x:2y:***************

    This made no difference.

    Any thoughts on how to further trouble shoot or preferably solve this issue is much appreciated. To bad we cannot see the ftp log with this adapter, it would be very helpful in certain cases.  


    Thursday, September 18, 2014 12:05 PM

All replies

  • Use BAM to monitor the activity, and perhaps it can give some tips to troubleshoot.
    Friday, September 19, 2014 10:12 AM
  • I can not really se how BAM would help me at all here. The attached error message indicates a problem at initalization of the receive location. Thus, no messages are ever received, and there is no where to apply a bam event.

    Gona try to add a wcf execption behavior and se if I can get some more details, but I am afraid that the error is occuring inside the unmanage c++ code of the adapter... Will update with findings from my what I can find in wcf exception behavior

    Friday, September 19, 2014 10:46 AM
  • I can reproduce this error on 2013 R2 against Wing FTP Server 4.3.8. I tried to reproduce against the Ubuntu 14.04 LTS VM in the Azure gallery, but that connection worked beautifully (that reports SFTP-3 as well, so likely not the protocol version).

    Checking on the server side (i.e., the SFTP server side via the server logs on the Wing FTP admin site), BizTalk is authenticating successfully and then closing the session. On the BizTalk Server side, it is immediately disabling the Receive Location and logging the same error message that you saw earlier.

    Unfortunately, I don't have much more to add at the moment than that. But maybe that gives you something a little bit more to go on.

    Did you find out anything more on your end?

    Sunday, September 21, 2014 6:48 AM
  • Hi Pal,

    If possible can you try to repair the blogical adapter.

    Monday, September 22, 2014 6:59 AM
  • Going back to my earlier post on SFTP adapter with BizTalk 2013 ,we have also faced this in the past which tempted us to with MS support for a private build .

    You Can validate the understanding from below post.

    http://social.msdn.microsoft.com/Forums/en-US/b9755703-788b-4245-a89c-6c4a38bbd00f/biztalk-2013-sftp-list-remote-directory-error?forum=biztalkgeneral

    Thanks

    Abhishek

    Monday, September 22, 2014 7:25 AM
  • Thank you, that is very helpful. I do not know which version of WingFTP our partner is using but it appears to be related to how the sftp server behavior and not cryptographic protocol or file transfer protocol.

    Most of our sftp send and receive ports works without a hitch, but we have so far found two exceptions where we get this unexpected behavior resulting in immediate receive location shutdown. First one is a WingFTP server, the second does not give out details about its server version or OS. 

    It seems this is a receive location issue only. For the last (not WingFTP) server I tried setting up a send and receive location and once i got the folder syntax right I was able to transfer files to this server. Receiving files was not possible and I got the same error as described in my original post.

    nick.hauenstein: Could you possibly attach the ftp server logs from your two servers (WingFTP and ubuntu) when you connect with with BizTalk? It seems fair to assume that a bug in the sftp adapter implementation kicks in when trying to receive files from certain ftp servers? I will log and see if I can compare the client log when connection with wingFTP and another working server and post it here.


    Monday, September 22, 2014 7:40 AM
  • Going back to my earlier post on SFTP adapter with BizTalk 2013 ,we have also faced this in the past which tempted us to with MS support for a private build .

    You Can validate the understanding from below post.

    http://social.msdn.microsoft.com/Forums/en-US/b9755703-788b-4245-a89c-6c4a38bbd00f/biztalk-2013-sftp-list-remote-directory-error?forum=biztalkgeneral

    Thanks

    Abhishek

    Thanks, this definitely looks related even if we get a different error message complaining about wrong configuration. It would have been nice to be able to turn on ftp log for this adapter...
    Monday, September 22, 2014 7:54 AM
  • Hi,

    This really sounds like an implementation mismatch between the MS Sftp adapter and the WingFTP. I have troubleshooted similar issues by using the return codes that can be seen with the network monitor tools.

    Most likely there is some kind of traffic going between your Biztalk and the SFTP-server side. Check if you can install a network traffic monitor tool of your choice like Wireshark or Fiddler. There are others as well.

    I doubt it that you can fix this with just parametrization and this requires a change in the SFTP-adapter or WingFTP-server. Unfortunately that server software is not open source, so that you can't actually find out if there is an easy way to fix it.

    Since Nick can reproduce the error, you should be able to verify or fix the blogical adapter functionality. That just might be the fastest way to solve the problem. And in addition report this as a bug for the Microsoft, if it turns out to be one.

    Monday, September 22, 2014 9:23 AM
  • Inspired by nick.hauenstein reply I downloaded the latest WingFTP Server for windows, set it up at my local box and tried to retrieve a file using Bts SFTP and then FileZilla client. 

    The wingFTP server was the latest version 4.3.8 for Windows. 

    I got the same result as before when trying to connect with BizTalk, and this is the WingFTP server log from that session:

    [01] Wed, 24 Sep 2014 08:17:37 SFTP(SSH) server starts listening on port 22. IP 127.0.0.1
    [02] Wed, 24 Sep 2014 08:32:51 (0000001) Connected from 127.0.0.1 (local address 127.0.0.1, port 22)
    [01] Wed, 24 Sep 2014 08:32:51 (0000001) SSH session receive user name:test
    [01] Wed, 24 Sep 2014 08:32:51 (0000001) SSH session receive password of user test
    [01] Wed, 24 Sep 2014 08:32:51 (0000001) SSH authentication completed successfully.
    [02] Wed, 24 Sep 2014 08:32:51 (0000001) Closed session,disconnected from 127.0.0.1
    
     

    As confirmed earlier, BizTalk is successfully authenticated, and then immediately disconnects the session. The receive location is disabled, and I get the same "Configuration error" as before.

    I then tried connecting with FileZilla windows client v 3.9.0.5 and this is how WingFTPs server log looks when using FileZilla:

    [02] Wed, 24 Sep 2014 08:43:30 (0000002) Connected from 127.0.0.1 (local address 127.0.0.1, port 22)
    [01] Wed, 24 Sep 2014 08:43:33 (0000002) SSH session receive user name:test
    [01] Wed, 24 Sep 2014 08:43:33 (0000002) SSH session receive password of user test
    [01] Wed, 24 Sep 2014 08:43:33 (0000002) SSH authentication completed successfully.
    [01] Wed, 24 Sep 2014 08:43:33 (0000002) The user test login successfully via SSH.
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_INIT: client SSH version 3
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_VERSION: server SSH version 3
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_REALPATH: path .
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_NAME: path .
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_REALPATH: path /.
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_NAME: path /.
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_OPENDIR: directory /
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_HANDLE: path /
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_READDIR: directory /
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_NAME: 3 items have been found
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_READDIR: directory /
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_STATUS: End of file
    [07] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_CLOSE: path /
    [08] Wed, 24 Sep 2014 08:43:33 (0000002) SSH_FXP_STATUS: / has been closed.
    

    I am quite curious about what goes "on the wire" after WingFTP logs "[01] Wed, 24 Sep 2014 08:32:51 (0000001) SSH authentication completed successfully.".

    Anyone know how to intercept this ssh traffic using Fiddler or WireShark? I assume it should be possible since i actually have the ssh key generated by WingFTP, but sniffing encrypted network traffic(on a vmware workstation instance) is new terrain for me.

    Wednesday, September 24, 2014 7:40 AM
  • Sorry for not getting back sooner. You're seeing in the logs exactly the same thing I did -- which sadly is not much to go on. I do not believe there's going to be an easy way to intercept and understand SSH traffic.

    I would say, as boring as it is, it's time to file a technical support incident: http://msdn.microsoft.com/en-us/biztalk/aa948874

    Especially because Microsoft (as authors of the client software and generators of the traffic) would likely have a lot more visibility into exactly what's going on there.

    In the alternative, if the SFTP adapter from bLogical is working for WingFTP, there's nothing wrong with using that. It's an excellent adapter.

    Those are just my two cents ;-)

    Wednesday, September 24, 2014 7:48 AM
  • Thank you for your input, it is much appreciated.

    We have in fact created a support incident with Microsoft and their support team is looking at this right now.

    Regarding bLogical and their sftp adapter this works fine in version 1.6 on BizTalk 2009 against the WingFTP server, and has been for some time.  Not sure how this adapter would work on 2013 R2, but if it can be avoided we would rather not have two different sftp adapters with different binding schemas etc in use.


    Wednesday, September 24, 2014 9:38 AM
  • Hi there.

    Just a quick update for the benefit of people experiencing the same problems.

    Microsoft has investigated our problem and verified the problem. They are including a fix for this error as a "feature request", so we keep our fingers crossed and hope a fix will be included in the first CU. I will update this thread when we get a response on our latest email "nudge".

    Friday, November 28, 2014 11:26 AM
  • Yes ,

    As been mentioned in my post its a long time issue with sftp adapter in BizTalk 2013 and R2 which we have reported a year back to MS from our end  and we have got some private build for that ,still public build is not available and may be available in  upcoming update for BizTalk .

    Thanks

    Abhishek

    Friday, November 28, 2014 11:43 AM
  • Hello 

    Try this..Microsoft BizTalk Server 2013 R2 SFTP Adapter Tricks and Pitfalls

    Good Luck


    Jason Sauers - Phidiax - CEO, Sr Integration and Cloud Architect

    • Proposed as answer by Jason Sauers Monday, April 4, 2016 2:58 PM
    • Unproposed as answer by Pål Carlsen Tuesday, April 5, 2016 9:18 AM
    Monday, March 14, 2016 12:32 AM
  • Nice summary of various tricks and pitfalls with the sftp adapter Jason Sauers. 

    However, I can not see how those tricks solve this particular problem.

    A bit disappointing that neither CU1 or CU2 has fixed this issue. We have heard from MS and they have verified our problem, and rumor is that this is fixed in next release of BTS. We heard that a backport to 2013 R2 might be released, so lets keep our fingers crossed.

    Tuesday, April 5, 2016 9:18 AM
  • I received the latest 2016 and the SFTP adapter has been updated to include greater flexibility. It also works off of the WinSCP binaries. We should see great improvements.

    -Jason


    Jason Sauers - Phidiax - CEO, Sr Integration and Cloud Architect

    Tuesday, April 5, 2016 3:05 PM
  • Here is a bit more:

    SFTP Adapter Enhancements

    • BizTalk SFTP adapter supported only a limited number of SftpServers as specified here. In BizTalk 2016, the adapter core has been re-engineered to support a much larger range of sftpservers.
    • The adapter is now using WinSCPto connect to the SFTP Servers. In order to use this adapter, the runtime machine should have WinSCPlibrary. Configuration steps can be found here.
    • Supported WinSCPversion 5.7.5.
    • More informative error messages.
    • More comprehensive tracing.


    Jason Sauers - Phidiax - CEO, Sr Integration and Cloud Architect

    Tuesday, April 5, 2016 3:23 PM
  • Hi There.

    Upgrading our BizTalk servers from 2009 to 2013 we also replace al bLogical sftp ports with the new sftp adapter included in the in bts 2013 R2. 

    This has worked fine so far, but for one server we get a strange problem. when trying to connect our receive location fails with the following error message:

    The Messaging Engine failed to add a receive location "TestReceive_SFTP" with URL "sftp://ftp1.dummyServer.com:22/*.txt" to the adapter "SFTP". Reason: "Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Unable to initialize SFTP connection. Ensure that the specified server's configuration details are correct.
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.Open()
       at Microsoft.BizTalk.Adapter.Sftp.SftpConnection.OpenUnderlyingConnection(SftpConnectionProperties connectionProperties)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.ConnectionPool`3.GetConnection(T1 connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.GetConnection(T connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.ValidateConfiguration(SftpReceivePropertyBag receivePropertyBag)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.CreateBinding(RHConfig rhConfig)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnBeginOpen()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiver`2.AddReceiveEndpoint(String url, IPropertyBag adapterConfig, IPropertyBag bizTalkConfig)".

    (Note, I replaced the actual ftp server address with dummyServer.com)

    I have testet the connection of course and both filezilla and winSCP connects without problem, as does blogicals codeplex sftp adapter in our old rigg.

    The problem is reproducable and occurs both in staging and on my local development image. 

    Here are some server properties I got from winSCP which might be significant:

    File transfer protocol = SFTP-3
    Cryptographic protocol = SSH-2
    SSH implementation = WingFTPserver
    Encryption algorithm = aes
    Compression = No

    Initially I used Accept Any SSH Server Host Key to True, but have tried setting it to false with server host key:

    SSH Server Host Key Finger Print:

    ssh-rsa 2048 1x:2y:***************

    This made no difference.

    Any thoughts on how to further trouble shoot or preferably solve this issue is much appreciated. To bad we cannot see the ftp log with this adapter, it would be very helpful in certain cases.  



    I have the exact same error , but on a SEND port. Now to the "funny" thing. It's an BizTalk cluster with 2 servers.  The problem ONLY happens on server NR2 , if I shutdown the hostinstance on that server everything works fine.  They are running BizTalk 2013 R2 CU2. One Other thing is this is an acceptance environment , then I have a Production Environment, that works fine, and they have the same configuration, except  destination folders. 
    Wednesday, May 25, 2016 9:26 AM
  • Not sure if you ever got to the bottom of this but after suffering from this issue repeatedly, changing the Connection Limit from 5 (default) to 1 it solved the problem: 

    Lowering the polling interval doesn't seem to jam the sftp adapter so depending on your sftp traffic you might want to adjust accordingly.

    Thanks

    Tuesday, April 10, 2018 10:53 AM
  • Did anyone ever manage to resolve this one or at the very least determine what the underlying issue is?

    I'm getting the same issue with a receive location, and also a Send Port going to the same SFTP server.  

    I can connect with FileZilla using the username & .ppk file configured in BizTalk.

    I've tried various things including

    • Set Accept Any SSH Server Host Key = True 
    • Change Encryption Cipher from Auto to AES (same error), TripleDES (Cipher error)
    • Setting the Folder Path
    • Changing the Connection Limit = 1
    • Setting Polling Interval = 5 minutes
    • Making sure that it is running on a 64 bit host

    Receive Location:

    The Messaging Engine failed to add a receive location "{ReceiveLocation}" with URL "sftp://{SERVER}:{PORT}/{FILEMASK}*.xml" to the adapter "SFTP". Reason: "Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Open SFTP connection error.
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.Open()
       at Microsoft.BizTalk.Adapter.Sftp.SftpConnection.OpenUnderlyingConnection(SftpConnectionProperties connectionProperties)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.ConnectionPool`3.GetConnection(T1 connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.GetConnection(T connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.ValidateConfiguration(SftpReceivePropertyBag receivePropertyBag)
       at Microsoft.BizTalk.Adapter.Sftp.SftpRLConfig.CreateBinding(RHConfig rhConfig)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
       at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint.Enable()
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfReceiveEndpoint..ctor(BizTalkEndpointContext endpointContext, IBTTransportProxy transportProxy, ControlledTermination control)


    Send Port:

    The adapter failed to transmit message going to send port "{SENDPORT}" with URL "sftp://{SERVER}:{PORT}/%SourceFileName%". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Open SFTP connection error.

    Server stack trace: 
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.Open()
       at Microsoft.BizTalk.Adapter.Sftp.SftpConnection.OpenUnderlyingConnection(SftpConnectionProperties connectionProperties)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.ConnectionPool`3.GetConnection(T1 connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapters.CommonHelpers.Connection`3.GetConnection(T connectionProperties, TimeSpan timeout)
       at Microsoft.BizTalk.Adapter.Sftp.SftpOutputChannel.Send(Message message, TimeSpan timeOut)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

    Exception rethrown at [0]: 
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)

    Exception rethrown at [1]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IOutputChannel.EndSend(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendCallback(IAsyncResult result)".


    Sunday, September 30, 2018 9:44 PM
  • Im interested to see the final results too.
    Sunday, September 30, 2018 10:08 PM
  • Starting to get a bit old this thread, and since then we have moved on to bts 2016 where winscp has fixed all our issues.

    But, if you are stuck on 2013 R2 for a while we got a solution from Microsoft which allowed us to use WinSCP libraries, like in bts 2016. This this will of course fix all your issues. Only thing to be aware of is that loading winscp seems to cost a fair amount more cpu and memory. We had to reduce polling intervals on our sftp receive ports when we migrated to bts 2016 because winscp loading nearly consumed all available rescources on our production servers. 

    I could not find this winscp fix on the official CU list, but I suggest that you contact MS support, and they could probably provide this to you as a private fix. I belive there is an important difference in version of c++ used to compile winscp which requires you to download a historic(and older) version of winscp than the one beeing used in bts 2016 but I do not have the exact details anymore.

    Good luck.  

    Monday, October 1, 2018 6:59 AM
  • Yes, this thread is a bit old, but there is also this thread Open SFTP connection error which is a lot more recent, which stated that the issue was fixed in CU1 for BizTalk 2013 R2 (FIX: "Open SFTP connection" error when you use the SFTP adapter in BizTalk Server).  So either this is a different issue with the same error, or it has regressed.  Either way, it clearly still is an issue.

    Yes, BizTalk 2016 as a possible solution long term would be the way to go, but I first have to convince the client of the benefits of that, and it would not give me a working solution now.

    I'm still checking out a few things to see if I can get to the bottom of the issue, otherwise, yes I might have to raise a ticket with Microsoft to get it resolved.


    • Edited by Colin Dijkgraaf Tuesday, October 2, 2018 9:47 PM Added link to Fix
    Monday, October 1, 2018 7:50 PM
  • Did this ever get resolved?

    I am seeing this same issue as we are moving connections to updated vendor SFTP instances that have had their ciphers suites pared down for security reasons. I am going to guess that the 2013R2 SFTP adapter has not been updated to live in the current world and has a deprecated set of ciphers available,

    Tuesday, February 26, 2019 7:29 PM
  • It depends on which issue?

    The one where the SFTP server uses a cypher that BizTalk 2013 R2 SFTP adapter does not support?  No. I had to resort to getting the third part nSoftware adapter installed to get that to work.  The other option of course is to upgrade to BizTalk 2016 and apply CU 5 and the later version of WinScp.

    For the issue of the out of the box SFTP adapter silently failing and not picking up anymore, requiring a host instance restart.  Changing the polling from the default 5 seconds, to something larger (5-10 minutes) on all receive locations, plus setting a schedule for files that are only expected at a certain time during the day seems to have worked, as we have not had a re-occurence of this issue since (fingers crossed).

    Tuesday, February 26, 2019 8:03 PM
  • Hi there.

    If you cannot upgrade to bts 2016 yet i suggest you try contacting Microsoft support and get your hands on the fix that allows you to use winscp even in bts 2013R2. I have described it in one of my earlier posts in this thread.

    Given that Microsoft has abandoned the sftp adapter used in 2013 and 2013R2 I would not expect any fixes or improvements on this particular area. 

    Wednesday, February 27, 2019 8:03 AM
  • Any chance I can get the KB number of the hot fix for reference when I go to ask them?


    Friday, March 1, 2019 3:00 PM
  • BizTalk is trying to use diffie-hellman-group-exchange as key exchange algorithm. In my case I removed it from the sftp-server configuration and it is working for me now.

    I'm using OpenSSH and added the following to sshd_config:

    KexAlgorithms -diffie-hellman-group-exchange-sha256


    • Proposed as answer by Johan_Ahlrik Tuesday, November 19, 2019 11:11 AM
    • Edited by Johan_Ahlrik Tuesday, November 19, 2019 2:45 PM
    Tuesday, November 19, 2019 11:09 AM
  • Many servers block also MAC algorithm : hmac-sha1 , which is needed in BizTalk 2013/2013 R2 SFTP adapter. So change that on SFTP server side or upgrade to BizTalk 2016 or use other 3rd party/custom SFTP adapter or external script outside of BizTalk (e g scheduled task to a file which BizTalk use). 

    BizTalk 2013/2013 R2 ciphers/KEX/MAC supported

    Key Exchange Init

        kex_algorithms string: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

        server_host_key_algorithms string: ssh-rsa,ssh-dss

        encryption_algorithms_client_to_server string: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc

        encryption_algorithms_server_to_client string: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc

        mac_algorithms_client_to_server string: hmac-sha1,hmac-sha1-96,hmac-md5

        mac_algorithms_server_to_client string: hmac-sha1,hmac-sha1-96,hmac-md5

        compression_algorithms_client_to_server string: none,zlib

        compression_algorithms_server_to_client string: none,zlib

    Friday, December 6, 2019 2:17 PM