none
Error using BizTalk 2010 FTP Send port with temporary folder RRS feed

  • Question

  • Hi

    We are upgrading from BizTalk 2009 to BizTalk 2010 with Cumulated Update 2. We are using temporary folders in our FTP send ports and the problem with BizTalk 2010 is that the Send FTP port is returning an error that it can't rename the file. The outgoing messages are suspended.

    The portconfiguration is exactly the same and we are going against the same FTP server with the same credentials.

    The port is setup as follows:

    Folder: /home/abc/in
    Target Filename: TO%MessageID%
    Temporary folder: /Tmp

    In BizTalk 2009 the FTP log looked like this:

    < 220 (vsFTPd 2.0.5)
    > USER biztalk
    < 331 Please specify the password.
    > PASS xxxx
    < 230 Login successful.
    > PWD
    < 257 "/home/abc/in"
    > CWD /tmp
    < 250 Directory successfully changed.
    > PWD
    < 257 "/tmp"
    > TYPE A
    < 200 Switching to ASCII mode.
    > PORT 10,224,133,142,11,93
    < 200 PORT command successful. Consider using PASV.
    > LIST
    < 150 Here comes the directory listing.
    < drwx------    2 0        0            4096 Feb 08 08:45 keyring-UASmSc
    < srwxr-xr-x    1 3571     100             0 Apr 21  2010 mapping-ao4040
    < srwxr-xr-x    1 500      100             0 Apr 16  2010 mapping-com
    < srwxr-xr-x    1 0        0               0 Feb 24 09:44 mapping-root
    < 226 Directory send OK.
    > TYPE I
    < 200 Switching to Binary mode.
    > PORT 10,224,133,142,11,94
    < 200 PORT command successful. Consider using PASV.
    > STOR {cdd5e771-26ff-4640-9356-756be64d3978}
    < 150 Ok to send data.
    < 226 File receive OK.
    > RNFR {cdd5e771-26ff-4640-9356-756be64d3978}
    < 350 Ready for RNTO.
    > RNTO //home/abc/in/TO{3BFB79B7-CE94-4B5A-861B-6243F602A962}
    < 250 Rename successful.

    In BizTalk 2010:

    < 220 (vsFTPd 2.0.5)
    > USER biztalk
    < 331 Please specify the password.
    > PASS xxxx
    < 230 Login successful.
    > PWD
    < 257 "/home/abc/in"
    > PWD
    < 257 "/home/abc/in"
    > PWD
    < 257 "/home/abc/in"
    > CWD /tmp
    < 250 Directory successfully changed.
    > PWD
    < 257 "/tmp"
    > TYPE A
    < 200 Switching to ASCII mode.
    > PORT 10,224,133,166,210,105
    < 200 PORT command successful. Consider using PASV.
    > LIST
    < 150 Here comes the directory listing.
    < drwx------    2 0        0            4096 Feb 08  2011 keyring-UASmSc
    < srwxr-xr-x    1 3571     100             0 Apr 21  2010 mapping-ao4040
    < srwxr-xr-x    1 500      100             0 Apr 16  2010 mapping-com
    < srwxr-xr-x    1 0        0               0 Feb 24  2011 mapping-root
    < 226 Directory send OK.
    > TYPE I
    < 200 Switching to Binary mode.
    > PORT 10,224,133,166,210,106
    < 200 PORT command successful. Consider using PASV.
    > STOR {82868267-a2d1-4ba8-bc20-d880aa5ef5d6}
    < 150 Ok to send data.
    < 226 File receive OK.
    > RNFR {82868267-a2d1-4ba8-bc20-d880aa5ef5d6}
    < 350 Ready for RNTO.
    > RNTO /home/abc/in//home/abc/in/TO{5E044D59-CE73-4EFE-BBAF-8A30F39D1336}
    < 550 Rename failed.

    It seems that it puts the folder name as source instead of the Temp source. As we are we are running exact the same FTP and the same portconfiguration I only can do one conclusion and that this is a bug.

    Anyone out there using temporary folders who has the same issue?

    Cheers


    RL




    • Edited by Ralf L Wednesday, February 15, 2012 8:50 AM
    Tuesday, February 14, 2012 5:39 PM

Answers

  • Hi all

    Solved the issue. It's the way the FTP adapter is working. Whats happening is this:

    The FTP server is using redirect on login so when the BizTalk FTP adapter is logging in to the FTP server the directory is set to /home/abc/in.

    A PWD command is issued by the FTP Adapter to get the current directory. This is the base directory and BizTalk now adds the specfied Folder in the FTP Adapter configuration to that path.

    Thats way the adapter runs the command RNTO /home/abc/in//home/abc/in/TO{5E044D59-CE73-4EFE-BBAF-8A30F39D1336} which was a invalid path.
    Instead I deleted the Folder configuration in the BizTalk Adapter and suddenly all starts to work.

    > RNTO //biztalk/XYZ-{9DD55F78-96C4-41D8-A216-B5E925042F89}.xml
    < 250 RNTO command successful.

    This means that with the FTP adapter you can only access the users home directory and downwards. You can not put files in directy /home.

    Strange thing is that this seems to be changes since BizTalk 2009 and I have not read any notes about it. If you want put files in many different directories you might consider to set the home directory for the FTP user to the FTP root.

    However how the paths are managed in teh Adapter is inconsistently because the Temporary Folder is not relativ to the Home Directory as teh Folder config is. The Temproary files are stored in /tmp and not under /home/Ao3571/in/tmp !!!

    Seems that someone at Microsoft should be looking through the code for the FTP adapter and make it somewhat more consistent.

    Cheers


    RL


    • Marked as answer by Ralf L Thursday, February 16, 2012 2:29 PM
    • Edited by Ralf L Thursday, February 16, 2012 2:45 PM
    Thursday, February 16, 2012 2:29 PM

All replies

  • Hi Ralf,

    Please note that there are major change in the FTP adapter in BizTalk 2010. Please see these two links (link1 and link2). You need to set certain additional property in the send port as explained in these two links.

    Thanks,Avi


    Please mark the post answered your question as answer, and mark other helpful posts as helpful, it'll help other users who are visiting your thread for the similar problem,

    • Proposed as answer by Tord G. Nordahl Thursday, February 16, 2012 10:13 AM
    Wednesday, February 15, 2012 11:06 PM
  • Hi,

    You are right about a lot of new functionality but nothing regarding the Send port properties using temporary folders.

    As shown in the logs BizTalk stores the file in the /tmp directory but it gets the destination directory wrong. It somehow concatinates the destinations directory twice.

    Will file a support case at microsoft regarding this issue.

    Any one have had the same problem?

     


    RL

    Thursday, February 16, 2012 12:03 PM
  • Hi all

    Solved the issue. It's the way the FTP adapter is working. Whats happening is this:

    The FTP server is using redirect on login so when the BizTalk FTP adapter is logging in to the FTP server the directory is set to /home/abc/in.

    A PWD command is issued by the FTP Adapter to get the current directory. This is the base directory and BizTalk now adds the specfied Folder in the FTP Adapter configuration to that path.

    Thats way the adapter runs the command RNTO /home/abc/in//home/abc/in/TO{5E044D59-CE73-4EFE-BBAF-8A30F39D1336} which was a invalid path.
    Instead I deleted the Folder configuration in the BizTalk Adapter and suddenly all starts to work.

    > RNTO //biztalk/XYZ-{9DD55F78-96C4-41D8-A216-B5E925042F89}.xml
    < 250 RNTO command successful.

    This means that with the FTP adapter you can only access the users home directory and downwards. You can not put files in directy /home.

    Strange thing is that this seems to be changes since BizTalk 2009 and I have not read any notes about it. If you want put files in many different directories you might consider to set the home directory for the FTP user to the FTP root.

    However how the paths are managed in teh Adapter is inconsistently because the Temporary Folder is not relativ to the Home Directory as teh Folder config is. The Temproary files are stored in /tmp and not under /home/Ao3571/in/tmp !!!

    Seems that someone at Microsoft should be looking through the code for the FTP adapter and make it somewhat more consistent.

    Cheers


    RL


    • Marked as answer by Ralf L Thursday, February 16, 2012 2:29 PM
    • Edited by Ralf L Thursday, February 16, 2012 2:45 PM
    Thursday, February 16, 2012 2:29 PM
  • Hi all,

    we have exactly the same problem upgrading from 2009 to 2010 using temporary folders.
    While logging biztalk 2010 you can see, the adapter uses an invalid path!

    < 150 Opening BINARY mode data connection for {fe2a067f-7caa-4870-b169-19cba08c5c15}
    < 226 Transfer complete
    > RNFR {fe2a067f-7caa-4870-b169-19cba08c5c15}
    < 350 File or directory exists, ready for destination name
    > RNTO /dtmp/reko/messages/adt//dtmp/reko/messages/adt/42.hl7
    < 550 Rename /dtmp/reko/messages/adt//dtmp/reko/messages/adt/42.hl7: No such file or directory
    > TYPE A

    we solve the problem by deleting the target-folder-configuration in the adapter-settings and set relativ-path for the temporary-folder.
    this workaround works by accident because the target-folder is the homedirectory of the ftp-user and the temp-folder is subdirectory of the homedirectory.

    official microsoft-support can't solve our problem because the target-ftp-server isn't running on operating systems mentioned in the list below

    http://support.microsoft.com/kb/841478.

    Seems that someone at Microsoft should be looking through the code for the FTP adapter and make it somewhat more consistent.

    Cheers from Germany, TB


    Tuesday, July 24, 2012 7:24 AM
  • @ Ralf L : Could you please confirm the version of FTP server you are using? I am assuming it was same for both BTS2009 and BTS2010.

    Thank you

    Tuesday, July 24, 2012 3:16 PM