Skip to main content
Inspiring
April 10, 2008
Answered

CFFTP Bug in 8.0.1?

  • April 10, 2008
  • 4 replies
  • 1512 views
We send ftp files daily to another server. Since the upgrade to 8.0.1 ftp errors every time with a
Diagnostics: null null

I have checked the variables being used in the ftp string
<cfftp action="PUTFILE" server="#getXMLPO.Vendorftpsite#" username="#getXMLPO.vendorFTPUser#" password="#getXMLPO.vendorFTPPassword#" stoponerror="Yes" localfile="#Request.getSystemSettings.ReceiptPath#\#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" remotefile="#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" transfermode="AUTO" port="21">

and everything looks correct.
    This topic has been closed for replies.
    Correct answer Sankaram
    Hmmnnn...This is an issue. As a work around you need to have a dummy connection attribute to your code for putfile to work. Code should be like this:
    <cfftp connection="<any name>" action="PUTFILE" server="#getXMLPO.Vendorftpsite#" username="#getXMLPO.vendorFTPUser#" password="#getXMLPO.vendorFTPPassword#" stoponerror="Yes" localfile="#Request.getSystemSettings.ReceiptPath#\#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" remotefile="#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" transfermode="AUTO" port="21">

    This problem doesn't happen when you open a FTP connection and do the file operations and close it.(In this case you already pass the connection attribute)

    Thnx
    Sankaram.

    4 replies

    Participating Frequently
    May 1, 2008
    Though a dummy connection name will work as a workaround, we are planning to release a hotfix so that you dont need to specify a dummy connection name.

    Thanks,
    Hemant
    Participant
    May 1, 2008
    Is anyone else having problems with CFFTP on 8.0.1?

    We have a nightly process that FTP's 6 files and the putfile seems to throw an error on files over 2 MB. I have set the timeout to 5 minutes which should be ample time.

    I was hoping someone may have had the same problem. This all started when we upgraded from coldfusion 7 to coldfusion 8.0.1

    Here are the results for a ftp that works and the file is under 2 MB
    Opening connection. struct
    ErrorCode 230
    ErrorText 230 User galasource logged in. Access restrictions apply.
    ReturnValue 230 User galasource logged in. Access restrictions apply.
    Succeeded YES

    put the localFile **********.txt: struct
    ErrorCode 226
    ErrorText 226 Transfer complete.
    ReturnValue 226 Transfer complete.
    Succeeded YES
    filename uploaded to remote file: teakalook.txt

    Close the connection: struct
    ErrorCode 221
    ErrorText [empty string]
    ReturnValue [empty string]
    Succeeded YES

    Here are the results for a ftp that does not works and the file is over 2 MB
    Opening connection. struct
    ErrorCode 230
    ErrorText 230 User galasource logged in. Access restrictions apply.
    ReturnValue 230 User galasource logged in. Access restrictions apply.
    Succeeded YES


    put the localFile **************.txt: struct
    ErrorCode -1
    ErrorText An error occurred during the FTP putfile operation.
    ReturnValue NO
    Succeeded NO
    filename uploaded to remote file: DRE.txt

    Close the connection:


    May 2, 2008
    there is a change in behavior on how timeout works in 8.0.1. Its more tightly bound to each operation. So when you specify any timeout depending on operation it would mean 3 things...
    1) the operations timeout
    2) connection timeout (if it needs to connect in that step)
    3) idle connection timeout

    Now this timeout is per operation and is not carried forth with connection. So if you give a timeout for opening a connection and use the same for getfile/putfile operation, you need to specify a new timeout for this operation as well. Else a default timeout of 30 sec is assumed. I believe this is where you are getting stuck. Add a timeout to that operation and it should work. If its not the case can you post/send your code such that i can have a look?

    I though agree there can be separate attribute for operations timeout, such that these issues wont arise. Probably we can log a enh for that.
    Inspiring
    April 11, 2008
    That worked!
    Sankaram
    Adobe Employee
    SankaramCorrect answer
    Adobe Employee
    April 11, 2008
    Hmmnnn...This is an issue. As a work around you need to have a dummy connection attribute to your code for putfile to work. Code should be like this:
    <cfftp connection="<any name>" action="PUTFILE" server="#getXMLPO.Vendorftpsite#" username="#getXMLPO.vendorFTPUser#" password="#getXMLPO.vendorFTPPassword#" stoponerror="Yes" localfile="#Request.getSystemSettings.ReceiptPath#\#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" remotefile="#getXMLPO.vendorAcctNo##getXMLPO.PONumber#.xml" transfermode="AUTO" port="21">

    This problem doesn't happen when you open a FTP connection and do the file operations and close it.(In this case you already pass the connection attribute)

    Thnx
    Sankaram.
    Known Participant
    April 27, 2008
    Thanks Sankaram. Just wanted to add my confirmation that adding a dummy connection name fixed my problem with CF8.0.1. as well. I was getting " java.lang.NullPointerException" and null null errors. cfftp failed every time, and it didn't matter whether I was using variables for attributes or values, passive or not, cached connection or not. the "dummy" connection name works.

    Inspiring
    April 10, 2008
    I tried hardcoding in the variables and setting the transfer mode to passive with the same results.