FTP Adapter: stream in error state.

Home Page Forums BizTalk 2004 – BizTalk 2010 FTP Adapter: stream in error state.

Viewing 3 reply threads
  • Author
    Posts
    • #20646

      I am trying to retrieve a file using the FTP Adapter but I get the error: “A stream read or write operation failed because the stream is in an error state.”

      I am using the a custom pipeline that simply logs a few details (audit trace) and returns the original message.

       

      Thanks for your help 

    • #20648

      That error is most likely occurring in the pipeline component.  To further diagnose the error, you can attach the Visual Studio debugger to the BizTalk process and step through the code.  In visual studio set a breakpoint in the pipeline component in the Execute method.  Then click Debug -> Attach to process, and select BTSNTSVC.exe.  Now send a file through your process.  It should stop on the breakpoint.  If it does not stop, then try putting the following line in the pipeline component code:

      System.Diagnostics.Debugger.Break();

      Now, when the pipeline componet runs, you should see a message on the screen asking if you would like to attach the debugger.  Click Yes.

    • #21577

      I’m having the same problem. Did anybody find a solution to this problem?

      • #21579

        Make sure the file being written to the FTP folder is completely written before it gets picked up by BizTalk as some FTP servers do not lock files and BizTalk starts picking them up before they’re finished being written: you can do this by changing the source system to write the file with a different extension and after writing renaming it to an extension that the BizTalk receive location is monitoring.

        Also, if you have two BizTalk servers as hosts of the host instance of FTP adapter receive handler you should cluster the host so that only one of the host instances is running at once.

        • #21580

          Good point. We do the same with our legacy systems (temporary file name and then rename). But there is similar sort of issue with FTP adapter when you use it outbound from BTS. Unfortunately, there is no flag in FTP adapter to use temporary file name while writing a file into remote FTP server.

          Edit: After a bit of research and testing, I’ve found temporary folder property for FTP send port being a very efficient way to use temporary file naming when sending data to remote FTP server.

    • #22196

      Did you ever figure this out I am getting the same error message?

       

      Please let me know what you figured out

Viewing 3 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.