none
%SourceFileName% problem with FTP Send Port & File Receive Port with No Orchestration RRS feed

  • Question

  • Hi,

    I am trying to setup a process where XML and PDF files saved to a folder are automatically sent to an FTP site with their filenames unaltered.  I have setup a FILE Receive Port & Receive location named Rcv_Folder using a UNC path and a *.* file mask.  I have verified that BizTalk can access the UNC folder.  I then setup an FTP Send port using %SourceFileName% in the Target File Name and created a filter BTS.ReceivePortName == Rcv_Folder

    When I place files into the folder, they are being picked up by the Receive Port (because they instantly disappear) but they aren't being transmitted to the FTP site.  I have verified that the credentials are correct and that the FTP site is accessible to the BizTalk Server.  I'm not seeing any errors in the suspended queues but I do see 1 error message per file in the Server Event viewer with the details. 

    The adapter failed to transmit message going to send port "Send_FTP" with URL "ftp://ftp.[EDITED].com:21/outgoing/%SourceFileName%". It will be retransmitted after the retry interval specified for this Send Port. Details:"The remote server refused a data connection.

    Please check permissions on the remote system. "."

    Is the BizTalk server actually trying to create the filename "%SourceFileName%"?  If I copy

    I then tried to place a file mask of *.PDF in the receive port and copy the XML and PDF File to the receive folder.  The PDF file is deleted from the receive folder and successfully uploaded to the FTP Server with the correct file name.  But then when I tried to do the same thing again, I received the same error as above so the problem appears to be random.

    We also have a Rosettanet application on the same Biz Talk server, but I made sure that all of my send and receive ports are using the Biz Talk Server Application handlers.  I even created the FTP settings in a new/separate BizTalk Application from the Rosettanet Application.

    Anyone got any clue what might be going on?

     

    Wednesday, May 11, 2016 3:03 PM

All replies

  • Have u tried uploading file using some ftp client like filezilla. Try and see if the files are uploaded using the same credentials.

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

    Wednesday, May 11, 2016 3:13 PM
    Answerer
  • by looking at the error message you shared -

    "The remote server refused a data connection. Please check permissions on the remote system." -- it seems like permissions issue or access rights with the service account that runs your FTP Send handler.

    The interesting part is here, if you can confirm few details --

    "I then tried to place a file mask of *.PDF in the receive port and copy the XML and PDF File to the receive folder.  The PDF file is deleted from the receive folder and successfully uploaded to the FTP Server with the correct file name.  But then when I tried to do the same thing again, I received the same error as above so the problem appears to be random."

    Does your XML file and PDF file use same receive location with file mask *.*. If yes, then you need to tell us what pipeline your are using. Or do you have separate RL for XML and PDF?

    1. XML and PDF --> RL1 --> PassThru ppl

    or

    2.

    XML --> RL1 --> xmlReceive

    PDF --> RL2 --> PassThru

    Note: because if you are using PassThru pipeline, the context properties should be available.


    • Edited by BlueSnowXYZ Wednesday, May 11, 2016 8:01 PM corrected self. statement regarding promotion sounded confusing
    Wednesday, May 11, 2016 3:26 PM
  • Yeah, I should have mentioned that.  I was able to upload the files just fine from my windows desktop.

    Wednesday, May 11, 2016 3:37 PM
  • My knowledge of BizTalk is actually really limited and by your question, it sounds like I may have missed a step in the setup.

    The XML and PDF files use the same receive location with the *.* mask and the PassThruReceive default pipeline.  I didn't use the XML Receive because I was also handling PDF files (and I don't know what I'm doing).

    I was researching the use of %SourceFileName% because some people state it doesn't get promoted and then others say it does.  So when I was able to get the single PDF to upload with the correct filename, I figured it was working correctly? 

    Wednesday, May 11, 2016 3:49 PM
  • no worries at all, let us know how it goes. On a side note, even though the filename is not promoted in PassThru ppl you may actually end up seeing a file with literal name - %SourceFileName%.*  when the process works correctly.
    Wednesday, May 11, 2016 5:16 PM
  • So from the posts I'm reading and what you're suggesting, I do need to create my own pipeline?
    Wednesday, May 11, 2016 7:04 PM
  • when you are not seeing the file in dest FTP folders is due to this - "The remote server refused a data connection. Please check permissions on the remote system"

    -- need to resolve that

    No, you don't need any new pipeline.

    Refer this if it helps

    • Edited by BlueSnowXYZ Wednesday, May 11, 2016 7:51 PM
    Wednesday, May 11, 2016 7:39 PM
  • Thank you for the link.

    For further testing, I changed the FTP Send Port to a FILE send port to a network folder and I am able to receive everything just fine.  My next step is test with an internal FTP server and see if it has the same problem. 

    Wednesday, May 11, 2016 8:37 PM
  • sounds like your are on the right track. Keep us posted !!
    Wednesday, May 11, 2016 8:43 PM
  • The internal FTP server worked also without any problem. I don't suppose you know of an FTP site I could test with?
    Wednesday, May 11, 2016 9:39 PM
  • I tested with an external FileZilla FTP server and there were no problems.  At this point, the problem is obviously with the clients FTP server.

    They are using something called Cleo VLTrader for their host and they found an entry in their log file where Biz Talk issued the command "opts utf8 on".  As their server doesn't understand the command, it responds with "501 'utf8': command not understood".  I'm not sure at what point in the process that command is being issued or if its causing the connection to terminate (the client only sent me those 2 entries).  When we tested with the FileZilla server, the command wasn't visible in the log file so I don't know why BizTalk sends the command to their server.

    I intend to perform a wireshark capture on the traffic and see what comes up as I should be able to see the utf8 on command being issued. 

    Friday, May 13, 2016 1:46 PM
  • Hi,

    Set the FTP send port to output to a Log file. 

    https://msdn.microsoft.com/en-us/library/aa559960.aspx?f=255&MSPPError=-2147217396

    Best regards 

    Rasmus Jaeger

    Tuesday, May 24, 2016 6:43 AM