locked
Unable to Read SFTP directory metadata RRS feed

  • Question

  • Hi,

    A few weeks ago I built a biztalk application which picks the file from a Secure SFTP location with port 22, and copies the file back to a different SFTP location after transformation. The application is working fine as required.

    Now I am building another biztalk application which needs to look into the same SFTP location with port 22 and read the metadata of all files sitting at that location i.e. filename, filesize, last modified date, permissions etc

    But when I try to get that information, it waits for 30 sec and come up with the following message:

    "Connection closed by remote host"

    What should I do to resolve this issue, could there be permissions at SFTP server that it allows biztalk to consume the file but does not allow to read the folder info?

    Kind regards,


    manibest

    Wednesday, April 20, 2016 9:11 AM

Answers

  • Hi all,

    Thanks for the responses first of all. I am using BizTalk Server 2013 R2.

    The adapter I used in my previous application to consume file from the SFTP location was the original SFTP adapter shipped with BizTalk.

    In the new application I am building to read the metadata of files sitting SFTP location, I am not too sure how to read only metadata and not consume files from that location by using the biztalk/blogical SFTP adapter. I was only testing to read the metadata through command prompt.

    Any suggestion on how to read metadata using biztalk adapter is most welcome.

    Kind regards


    manibest

    Whether it be blogical SFTP adapter or SFTP adapter shipped with BizTalk, None provide you the functionality to read the metadata of the file without consuming them. You cannot achieve this with the default adapters available. You might consider writing custom adapter for this.

    If you wish to do this outside BizTalk below link could be useful.

    Finding file size and last modified of SFTP file using Java


    Rachit Sikroria (Microsoft Azure MVP)

    • Proposed as answer by Angie Xu Thursday, April 28, 2016 2:03 AM
    • Marked as answer by Angie Xu Thursday, April 28, 2016 2:03 AM
    Saturday, April 23, 2016 5:24 AM
    Moderator

All replies

  • Some of the issues with the SFTP adapter were resolved with the Cumulative updates. Did you try installing the latest cumulative updates and see if that resolves the issue?

    I am assuming your Biztalk server is 2013 or 2013 R2 and you are referring to the SFTP adapter that comes with it.

    • Edited by Sid Karnati Wednesday, April 20, 2016 3:26 PM
    Wednesday, April 20, 2016 3:25 PM
  • Hi,

    Thank you for posting on MSDN forum.

    Can we know which version on BizTalk Server are you using and,

    Have you tried to connect with FileZilla or Core FTP for confirmation like it is working.


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Wednesday, April 20, 2016 7:04 PM
    Moderator
  • Hi,

    Are you using blogical SFTP adapter OR SFTP adapter shipped with BizTalk?

    Thanks


    JB

    Wednesday, April 20, 2016 8:45 PM
  • Hi all,

    Thanks for the responses first of all. I am using BizTalk Server 2013 R2.

    The adapter I used in my previous application to consume file from the SFTP location was the original SFTP adapter shipped with BizTalk.

    In the new application I am building to read the metadata of files sitting SFTP location, I am not too sure how to read only metadata and not consume files from that location by using the biztalk/blogical SFTP adapter. I was only testing to read the metadata through command prompt.

    Any suggestion on how to read metadata using biztalk adapter is most welcome.

    Kind regards


    manibest

    Thursday, April 21, 2016 9:15 AM
  • Hi all,

    Thanks for the responses first of all. I am using BizTalk Server 2013 R2.

    The adapter I used in my previous application to consume file from the SFTP location was the original SFTP adapter shipped with BizTalk.

    In the new application I am building to read the metadata of files sitting SFTP location, I am not too sure how to read only metadata and not consume files from that location by using the biztalk/blogical SFTP adapter. I was only testing to read the metadata through command prompt.

    Any suggestion on how to read metadata using biztalk adapter is most welcome.

    Kind regards


    manibest

    Whether it be blogical SFTP adapter or SFTP adapter shipped with BizTalk, None provide you the functionality to read the metadata of the file without consuming them. You cannot achieve this with the default adapters available. You might consider writing custom adapter for this.

    If you wish to do this outside BizTalk below link could be useful.

    Finding file size and last modified of SFTP file using Java


    Rachit Sikroria (Microsoft Azure MVP)

    • Proposed as answer by Angie Xu Thursday, April 28, 2016 2:03 AM
    • Marked as answer by Angie Xu Thursday, April 28, 2016 2:03 AM
    Saturday, April 23, 2016 5:24 AM
    Moderator