Copy link to clipboard
Copied
I'm trying to have my script connect to an offsite FTP server using CFFTP tag.
So far every CFFTP tag I use appears to fail with the possible exception of the action="open".
The error I get is 425: Can't build data connection: No route to host.
I can ftp using a telnet session from the same server just fine. This is with CF8 on a Sun workstation as server (Unix).
I have tried with and without a proxy server.
I have tried with passive mode = yes and no. When no the error occurs quickly. When yes it takes about 30 seconds or more to tell me the same error.
I have tried action = listdir and existfile and no success. I have verified the directory specified on the remote server is valid.
I have made sure the Enable ColdFusion Security checkbox is checked. I have no idea if anything needs to be done with the sandbox stuff in the lower part of that form.
I'm totally stumped here. My code is this:
<cfftp connection="Myftp"
action="Open"
server="xxxxx"
username="anonymous"
password="xxxxx"
passive="yes"
stoponerror="Yes">
<cfftp connection=Myftp
action="GetCurrentDir"
stoponerror="Yes">
<!--- Get the current directory name --->
<cfftp connection="Myftp"
action="listdir"
directory="#cfftp.returnvalue#"
name="dirlist"
stoponerror="Yes">
It fails on the last line above. What should I try?
What other common roadblocks can cause this?
Copy link to clipboard
Copied
Did the FTP server recently changed IP addresses ? (I ask because Java
caches IP addresses for a long time by default)
Do you have the possibility to check the actual trafic ? (with tcpdump
for example)
Also, telnet will not show the whole picture (it makes sure that the
initial connection to port 21 works but not that the subsequent
connections work - ftp is a protocol that uses 2 connections: one for
command and one for actual data transfer). Check with command line ftp
to make sure that it works.
Mack
Copy link to clipboard
Copied
mack, the FTP cerser did not change IP addresses. Don't know how to use tcpdump to check the traffic.
command line in telnet for listing a directory works fine.
This appears to be a CF8 issue. I can't get anyone to indicate that they can do directory listings with CFFTP on a remote server. I'd like to confirm this is an issue with my provider (FTP Today) versus a CF8 issue with this tag.
Copy link to clipboard
Copied
I've used CFFTP to list directory contents in the past and it worked
so I think the problem might be specific to your setup. My bet would
be on a passive vs active issue (a firewall rule that blocks the
incoming request for the active mode).
Mack