ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (GNF, Contractor)" <>
Subject RE: Problem FTPing files
Date Mon, 15 Mar 2004 17:13:56 GMT
Are you going through a firewall? I recall FTP task does not support it (or is it proxy?) Ohh...
I see it, it's both of them.

>From Ant Manual[1]:

This task does not currently use the proxy information set by the <setproxy> task, and
cannot go through a firewall via socks.

I recall I had an issue like this, but with RMI. I was trying to execute an operation from
a machine to another using RMI, but we had to go through a firewall (security issues). The
task was not completed since the firewall was masking the real IP to another IP and the RMI
engine never got the answer back. I think you might have quite an issue like that. 

	I took a look at the commons-net-1.1.0 source code and I found a scenario like I am describing
above (according with the javadoc provided); this is the code:

<quote srcfile="org/apache/commons/net/ftp/" line="483">
        if (__remoteVerificationEnabled && !verifyRemote(socket))
            InetAddress host1, host2;

            host1 = socket.getInetAddress();
            host2 = getRemoteAddress();


            throw new IOException(
                "Host attempting data connection " + host1.getHostAddress() +
                " is not same as server " + host2.getHostAddress());

As you can see, the verifyRemote(socket) method is returning false, so the exception is thrown.
This method, is implemented in class:

<quote srcfile="org/apache/commons/net/" line="515">
    public boolean verifyRemote(Socket socket)
        InetAddress host1, host2;

        host1 = socket.getInetAddress();
        host2 = getRemoteAddress();

        return host1.equals(host2);

This info comes from the package version 1.1.0 available online at [2]

Hope this helps to you (or at least, gives you a clue about where to start to look into).

In case you wonder, this is the class hierarchy:


-----Original Message-----
From: Srivastava, Abhinav []
Sent: Friday, March 12, 2004 5:21 PM
Subject: Problem FTPing files

I am trying to use FTP task of Ant. I get this error - any clues??

ant FTP -verbose
Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: build.xml
Detected Java version: 1.4 in: C:\bea\jdk141_05\jre
Detected OS: Windows 2000
parsing buildfile F:\CMA 2.0\Code\build.xml with URI =
Project base dir set to: F:\CMA 2.0\Code
Build sequence for target `FTP' is [FTP]
Complete build sequence is [FTP, ZIP, INIT, PVCS, REQPRO, default, ]

      [ftp] Opening FTP connection to
      [ftp] connected
      [ftp] logging in to FTP server
      [ftp] login succeeded
      [ftp] changing the remote directory
      [ftp] sending files
      [ftp] disconnecting

F:\CMA 2.0\Code\build.xml:46: error during FTP transfer: Ho
st attempting data connection is not same as server



To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message