ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berglas, Anthony" <aberg...@rsasecurity.com>
Subject Bug: waitfor waits too long, too slow
Date Tue, 17 Apr 2007 01:32:57 GMT
Hello All,

I have the following fragment in a build that restarts tomcat
        <waitfor>
            <not>
                <socket server="dbserver" port="8080"/>
            </not>
        </waitfor>

The trouble is that it takes about 30 seconds to run, even if Tomcat has
not run for a while, and there is nothing port 8080 at all.  

This is on Windows XP.

Setting checkevery does not help.

The following netstats were done before, during (two) and after the
waitfor.  

C:\Documents and Settings\aberglas>netstat -ao | findstr 8080

C:\Documents and Settings\aberglas>netstat -ao | findstr 8080
  TCP    aberglas-pc:2520       10.16.172.13:8080      SYN_SENT
2444

C:\Documents and Settings\aberglas>netstat -ao | findstr 8080
  TCP    aberglas-pc:2520       10.16.172.13:8080      SYN_SENT
2444

C:\Documents and Settings\aberglas>netstat -ao | findstr 8080

(If Tomcat had been run recently, there can be some TIME_WAITS as well,
but I think that that is quite irrelevant.  In any case the problem is
still there if there are no TIME_WAITS as demonstrated above.)

Feels like this is a bug, in ant or windows.  I've needed to replace
waitfor with a sleep, which is unfortunate.  Any help appreciated

A related feature request, is that it would be good to be able to wait
for a file lock to be removed on windows.  Or to be able to put a time
out on delete.

Anthony

--
Dr Anthony Berglas 
Ph. +61 7 3227 4410
(Mob. +61 42 783 0248)
ABerglas@RSA.com; Anthony@Berglas.org


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


Mime
View raw message