You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by JWM <te...@malcolms.com> on 2006/02/28 23:21:55 UTC

RE: Ant FTP Hangs -- Additional Info

Just trying to change things to see if it fixes it or if it caused the
symptoms to change to perhaps something more obvious, I changed the ant task
to use passive ftp.  Still fails randomly after a while each run.  But now I
get this error message each time.

Can someone interpret this?  What address?  The IP and/or port?  It almost
looks like multithread collisions.  I'm not running any other instances of
this at the same time


BUILD FAILED
C:\backup\ftp\build.xml:62: error during FTP transfer:
java.net.BindException: Address already in use: connect
        at
org.apache.tools.ant.taskdefs.optional.net.FTP.execute(FTP.java:2020)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:301)
        at org.apache.tools.ant.Target.performTasks(Target.java:328)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
        at org.apache.tools.ant.Main.runBuild(Main.java:632)
        at org.apache.tools.ant.Main.startAnt(Main.java:183)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)

-----Original Message-----
From: JWM [mailto:techstuff@malcolms.com] 
Sent: Tuesday, February 28, 2006 3:30 PM
To: 'Ant Users List'
Subject: RE: Ant FTP Hangs

Rhino,

Thanks for the reply.  I'm certain the space is there.  Also, the first time
it transferred a bunch of files and hung.  Restarted and it transferred a
bunch more files before it hung, etc.  Ditto several times. If it was a
target space problem, I suspect it would hit a wall at the same file each
time.

I'll check out the other FTP task and see if I have better luck.

In the meantime, if anybody else knows a way to drill down with additional
traces/logs to see precisely what is hanging, I'm willing to do the
analysis.

Thanks again.

JWM

-----Original Message-----
From: Rhino [mailto:rhino1@sympatico.ca] 
Sent: Tuesday, February 28, 2006 3:16 PM
To: Ant Users List
Subject: Re: Ant FTP Hangs

I had similar behaviour several weeks back when I tried to FTP a much 
smaller number of files, no more than 200. I don't recall if I got no 
message at all or just a very vague and misleading one.

It eventually turned out that the server which was receiving the files had 
filled up. It was just a 5 MB chunk of space and already had a number of 
files on it; my FTP exhausted the space before I had all the files 
transferred. I recall that I had to discover the problem by poking around on

the server; Ant told me very little that was of use.

Perhaps you are having a similar problem?

I think you're asking how to debug your problem via return codes, registers,

logs or whatever but I didn't do anything like that in my case so I can't 
suggest a good general technique for debugging FTP problems.

In my case, I knew the space I was targetting was fairly limited; I just 
didn't realize that it was as full as it was. When the FTP failed and I 
couldn't see any other obvious error in my Ant task, I immediately suspected

space might be the culprit and figured out how much space I was using and 
how much was left; it soon became obvious that I had exhausted the space.

I don't suppose that will help you much unless you are having the exact same

problem but it's the best I can do.

Oh, one other thing, a couple of years back, I discovered that there was an 
alternate FTP task for Ant. It has a slightly different approach but 
essentially does the same things in a more efficient manner. Perhaps you'll 
have better luck using it? The URL is http://oss.ipov.org/iftp-ant/.

--
Rhino

----- Original Message ----- 
From: "JWM" <te...@malcolms.com>
To: <us...@ant.apache.org>
Sent: Tuesday, February 28, 2006 3:50 PM
Subject: Ant FTP Hangs


I have an ant script that date checks and FTPs several thousand files.  Ant
gets a portion of the way through it and hangs (I run -verbose).  I'll run
it again, and it'll get further (apparently because more files have already
been transferred each iteration), then hang again.  But it appears to be
diminishing returns.  After restarting a bunch of times, it now date checks
the first thousand or so, then transfers a couple of more.  Then locks up.
There is no error message.

I've tried this on different client machines and FTP'ing to different
servers with different FTP servers (linux on one, IIS on another).

Is FTP just that flaky?

Is there any way I can get more information as to what is really happening?

Is there any trick to FTP'ing this massive number of files short of breaking
it up into a bunch of smaller separately-invoked ant scripts?

I'm a software developer and can debug if someone can give me at least the
zipcode of where to start looking.

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/271 - Release Date: 28/02/2006




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/271 - Release Date: 28/02/2006


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant FTP Hangs -- Additional Info

Posted by Steve Loughran <st...@apache.org>.
JWM wrote:
> Just trying to change things to see if it fixes it or if it caused the
> symptoms to change to perhaps something more obvious, I changed the ant task
> to use passive ftp.  Still fails randomly after a while each run.  But now I
> get this error message each time.
> 
> Can someone interpret this?  What address?  The IP and/or port?  It almost
> looks like multithread collisions.  I'm not running any other instances of
> this at the same time
> 



> 
> BUILD FAILED
> C:\backup\ftp\build.xml:62: error during FTP transfer:
> java.net.BindException: Address already in use: connect
-----
public class BindException extends SocketException

Signals that an error occurred while attempting to bind a socket to a 
local address and port. Typically, the port is in use, or the requested 
local address could not be assigned.
---

something else may be listening, the question is: which port. It may 
just be an accidental clash.

try passive="true"

I've just tweaked <ftp> in the repository to not strip out so much of 
the caught exception, so a -v run will include more diagnostics. Check 
it out and rebuild ant if you want to do more debugging.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org