You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Lybarger <Ma...@CBC-Companies.com> on 2004/11/10 16:04:22 UTC

using waitfor to see when a server goes down

is it possible to use waitfor or some other task to see if a server/port has been closed?

we're using this to wait for the server to be up before we deploy components to the server, but would like to also identify if something went wrong during shutdown.

    <waitfor maxwait="5" maxwaitunit="minute" checkevery="500" timeoutproperty="admin.server.start.failed">
      <and>
	    <socket server="localhost" port="${Server.Admin.ListenPort}" />
	  </and>
    </waitfor>  
    <condition property="admin.server.isrunning">
          <not>
		<isset property="admin.server.start.failed"/>
	</not>
   </condition>  	

ideas?