SFTP Adapter throws an error RRS feed

  • Question

  • Hi Everyone,

    We are having some trouble with an SFTP receive location, using the standard SFTP adapter on a 2013R2 standard server which has been updated with CU1. Yes, one may recognize the following error from the list of issues which should be fixed in CU1.  Every time the remote location is polled, an error is thrown in the Event log: 
    The adapter "SFTP" raised an error message. Details "System.Exception: Message: Open remote file for read error.. Sftp Error Code: '3221488139'. Sftp Error message: 'The system cannot find the file specified.
    '. ---> Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Open remote file for read error.
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.OpenRemoteFileRead(String fileName)
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpFileReaderStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at Microsoft.BizTalk.Adapter.Sftp.SftpFileReceiver.TryReceive(TimeSpan timeout, RequestContext& context)
       --- End of inner exception stack trace ---

    Server stack trace: 
       at Microsoft.BizTalk.Adapter.Sftp.SftpFileReceiver.TryReceive(TimeSpan timeout, RequestContext& context)
       at Microsoft.BizTalk.Adapter.Sftp.SftpReplyChannel.TryReceiveRequest(TimeSpan timeout, RequestContext& context)
       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.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
       at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
       at Microsoft.BizTalk.Adapter.Sftp.SftpReplyChannel.TryReceiveRequestDelegate.EndInvoke(RequestContext& context, IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Sftp.SftpReplyChannel.EndTryReceiveRequest(IAsyncResult result, RequestContext& context)
       at System.ServiceModel.Dispatcher.ReplyChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
       at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)".

    With WinSCP, I can see that there is a file waiting to be picked up in the remote folder. It remains there, so BizTalk is unable to complete the poll/read/delete operation. 

    The error matches everything about error/fix #2990704 (including Maverick as the remote server), which is included in CU1, which has been installed on the server. 

    I have tried variations of directory paths and file masks and nothing seems to make a difference. 

    We are in the process of digging up a license for the NSoft adapter, and are aware of the Blogical adapter, but it would be great to find out something about why we are battling a known and fixed error? Any suggestions?

    Thank you, 

    Kevin Foust

    Tuesday, September 12, 2017 1:06 PM

All replies

  • Hi Kevin,

    >> Open remote file for read error.. Sftp Error Code: '3221488139'. Sftp Error message: 'The system cannot find the file specified

    This issue might occur because during directory listing (ls), the SFTP adapter (SFTP client) sends the SSH_FXP_OPENDIR packet and expects the SSH_FXP_HANDLE packet according to SFTP version 3. But some servers, for example, Maverick-based servers, send back the SSH_FXP_STATUS (error occurred) packet. The SFTP server is expecting the optional SSH_FXP_REALPATH packet before the OpenDir packet.

    hope it helps.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, September 25, 2017 7:01 AM
  • Hi Angie

    So is there a solution or a work around for this issue?

    We've also experienced this error.



    Wednesday, September 27, 2017 2:03 AM
  • Hi Angie,

    We've got the same error (BizTalk 2013 R2, CU8), this is very annoying as we want to create flow with our partner    is there a workaround ? 



    Thursday, June 13, 2019 10:20 AM