tracker issue : CF-3673298

select a category, or use search below
(searches all categories and all time range)

Cfftp action putfile failing after processing for secure FTP server

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / Yuliang Ruan (Md. Kaif Akbar Quraishi)

Created: 11/21/2013

Components: Net Protocols, sFTP

Versions: 9.0.1

Failure Type:

Found In Build/Fixed In Build: 9,0,1,274733 / CF11 Update5

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Listed in the version Issues Fixed doc
There is issue for  cfftp application, where it is getting multiple feeds and doing open & putfile action for each of its feeds loop of multiple FTP server, once it processes for secureFTP server from the list of ftp server then it fails for remaining non-secureFTP servers.

Below is code snippet from client complete application, which is mainly  responsible for throwing this error:-
<cfloop query=”feeds”>
		<cfset passive = "Yes">
		<cfif is 13><cfset passive = "No"></cfif>
        <cfftp action="OPEN" connection="ftpConn" server="#feed.ftpServer#" username="#feed.ftpLogin#" password="#feed.ftpPassword#" passive="#passive#"  timeout="1200" port="#feed.ftpSecure ? 22 : 21#" secure="#feed.ftpSecure is 1#" stopOnError="yes">
          <cfset isOpen = true>
                <cfif len(feed.ftpDirectory) gt 0>
                	<cfftp action="CHANGEDIR" directory="#feed.ftpDirectory#" connection="ftpConn">
		<cfftp action="PUTFILE" connection="ftpConn" localfile="#feedExportFilename#" remotefile="#getFileFromPath(feedExportFilename)#" timeout="1200" stopOnError=”yes”>
		<cfftp action="CLOSE" connection="ftpConn" stoponerror="no">
    	 <cfset task.logError(cfcatch)>
It couldn't be tested at our end as it needs combination of non-secure & secure FTP server whereas we have only non-secure FTP server.

1) Open action of cfftp invoked
2) Putfile action of cfftp invoked
When step 1 & 2 are repeated for multiple ftp server address including non-secure & secure FTP server.
When it completes for secure FTP server then it fails for rest of remaining FTP server.

It fails after processing secureFTP server.

It shouldn't after processing secureFTP server and complete processing for rest FTP server.

Need to be identified.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3673298

External Customer Info:
External Customer Name: Yuliang Ruan
External Customer Email:



Sample Test Case to repro the issue. <cfset ftpStructArray = Arraynew(1)> <cfset server1 = structNew()> <cfset server1["host"] = "xx.xx.xx.xx"> <cfset server1["port"] = "22"> <cfset server1["secure"] = true> <cfset server1["username"] = "xxxx"> <cfset server1["password"] = "xxxx"> <cfset server2 = structNew()> <cfset server2["host"] = ""> <cfset server2["port"] = "21"> <cfset server2["secure"] = false> <cfset server2["username"] = "anonymous"> <cfset server2["password"] = "anonymous"> <cfset arrayAppend(ftpStructarray,server2)> <cfset arrayAppend(ftpStructarray,server1)> <cfloop array="#ftpstructArray#" index="index" > <cfset passive = "Yes"> <cfftp action="open" server="#index['host']#" username="#index['username']#" passive="#passive#" password="#index['password']#" secure="#index['secure']#" connection="connection"> <p>Did it succeed? <cfoutput>#cfftp.succeeded#</cfoutput> <cfdump var="#cfftp#" > <cfdump var="#connection#" > <cfftp action="putfile" localfile="C:\sample\test.pdf" connection="connection" remotefile="test.pdf"> <cfftp action="close" connection="connection" > </cfloop>
Comment by S V.
13912 | May 07, 2014 12:00:19 AM GMT
Test case location in perforce: //depot/qa/cf/regression/coretests/coldfusion/tags/internet-protocol/cfftp/Bugs/CF-3673298/CF-3673298.cfm (Comment added from ex-user id:nawani)
Comment by Adobe D.
13913 | February 09, 2015 04:56:40 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
13914 | February 20, 2015 09:28:31 AM GMT