none
Using SFTP adapter gets error:Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Open remote file for write error. RRS feed

  • Question

  • Am getting an exception at the sendport configured with SFTP adapter.

    Following is the error:

    Microsoft.BizTalk.Adapter.SftpInvoker.SftpException: Open remote file for write error.

    Server stack trace: 
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpInvoker.OpenRemoteFileWrite(String fileName, Int32 fileOffset)
       at Microsoft.BizTalk.Adapter.SftpInvoker.SftpFileWriterStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       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)
       at System.ServiceMode

    I got a similar error with WinSCP tool. But once i set ignore permission errors in the preferences section of the winscp tool, it worked.

    I cannot find a similar setting in the SFTP adapter. Any help?

    Friday, November 17, 2017 9:45 AM

All replies

  • does the SFTP user have write permissions on the destination directory ?? You'd need to ensure that the appropriate permissions are given to the folder for the write to execute.

    Regards.

    Friday, November 17, 2017 10:27 AM
  • I donot have that information @Shankycheil. But I am able to post from winscp by setting ignore permission error flag to true.
    Friday, November 17, 2017 11:38 AM
  • Hi,

    The user need to have write permission on the sftp folder .

    You need to verify from the end client on the rights given to the sftp user  and if read/write access is not granted then the end client has to add the required permission .


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Friday, November 17, 2017 2:20 PM
  • I observe that in FTP adapter there is a way to log the FTP commands between the client and server. But there is no property for configuring such LOGS in SFTP. Is there any?
    Monday, November 20, 2017 9:12 AM