CFFTP Connection is not open error

820 views
Skip to first unread message

Bart

unread,
Apr 4, 2013, 3:36:16 AM4/4/13
to ra...@googlegroups.com
Hi, I have tis error and I don't know why.
I open a FTP error, do some directory actions and all is fine. However, if I try tu put a file there, I get an error. This all used to work fine on CF8. I can FTP to the machine using a ft program.

The code:
<cfftp action="open"
server="#application.PDFServerIP#"
username="username" password="password"
connection="newCon" timeout="60" passive="yes"> this works, I can dump cfftp.

<cfftp action="existsDir" 
connection="newCon" 
directory="#uploadDir#" passive="yes"> this works, I can dump cfftp.

<cfftp action="listdir"
connection="newCon"
name="q"
directory="/#uploadDir#" passive="yes"> this works, I can dump cfftp.

<cfftp action = "putFile"
connection = "newCon"
transfermode = "binary"
localfile = "#locFile#" 
remotefile = "#remotefile#"
timeout = "60" passive="yes"> This fails I get:java.io.IOException Connection is not open (errorcode 0)

stack trace:
Connection is not open at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:470):470 at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:552):552 at org.apache.commons.net.ftp.FTP.type(FTP.java:1026):1026 at org.apache.commons.net.ftp.FTPClient.setFileType(FTPClient.java:1350):1350 at railo.runtime.net.ftp.FTPWrap.connect(FTPWrap.java:97):97 at railo.runtime.net.ftp.FTPWrap.reConnect(FTPWrap.java:76):76 at railo.runtime.net.ftp.FTPWrap.reConnect(FTPWrap.java:82):82 at railo.runtime.net.ftp.FTPPoolImpl._get(FTPPoolImpl.java:57):57 at railo.runtime.net.ftp.FTPPoolImpl.get(FTPPoolImpl.java:26):26 at railo.runtime.tag.Ftp.getClient(Ftp.java:479):479 at railo.runtime.tag.Ftp.actionPutFile(Ftp.java:388):388 at railo.runtime.tag.Ftp.doEndTag(Ftp.java:156):156 at ftptest_cfm$cf.call(C:\Werf3\domains\3pub.nl\www\ftptest.cfm:46):46 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:802):802 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:754):754 at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:183):183 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2255):2255 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2222):2222 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:315):315 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:728):728 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305):305 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210):210 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222):222 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123):123 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472):472 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171):171 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99):99 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118):118 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407):407 at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200):200 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589):589 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310):310 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source):-1 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source):-1 at java.lang.Thread.run(Unknown Source):-1


The server I am uploading to is a Windows Server 2008. As stated this used to work fine. I can manually ftp the file. The file exists on the localmachine.
I tried closing the connection and reopening antoher before the putfile. I tried changing oassive mode, but all to no avail.

Anyone?

Cheers,

Bart



Bart

unread,
Apr 4, 2013, 3:37:31 AM4/4/13
to ra...@googlegroups.com
I forgot to mention: I am running the latest Railo4 on a Windows server 2008 machine.

Bart

unread,
Apr 4, 2013, 9:53:17 AM4/4/13
to ra...@googlegroups.com
Found it!

Apparently  transfermode = "binary" does not work. transfermode = "auto" is the way to go.

Cheers,

Bart
Reply all
Reply to author
Forward
0 new messages