Hi
I'm trying to "ping" hosts on network using <isreachable> with ant-contrib.
All these hosts variables point to the same host ie linpac2.
<ac:for list="${sunmdm_ap1_hostname},
${sunmdm_ap2_hostname},${sunref_ap1_hostname},
${sunref_ap2_hostname},${sunmdm_db1_hostname},
${sunmdm_db2_hostname},${sunref_db1_hostname},
${sunref_db2_hostname},${sunmdm_lg1_hostname},
${sunmdm_lg2_hostname},${sunref_lg1_hostname},
${sunref_lg2_hostname}" param="letter">
<ac:sequential>
<echo> start isreachable @{letter}</echo>
<condition property="offline" value="0">
<isreachable host="@{letter}" timeout="10000"/>
</condition>
<echo level="verbose"> build_main.debug=${offline}</echo>
<sleep hours="0" minutes="0" seconds="5" milliseconds="0" />
</ac:sequential>
</ac:for>
When I ran this I get for example -
[echo] start isreachable linpac2
Dynamically discovered 'isreachable'
[EMAIL PROTECTED]
Probing host linpac2
Host address = 192.168.126.192
host is reachable
Condition true; setting offline to 0
Override ignored for property "offline"
[echo] build_main.debug=0
[sleep] sleeping for 5000 milliseconds
[echo] start isreachable linpac2
Dynamically discovered 'isreachable'
[EMAIL PROTECTED]
Probing host linpac2
Unknown host: linpac2
Condition false; not setting offline
[echo] build_main.debug=0
[sleep] sleeping for 5000 milliseconds
Why on both consecutive "pinging" to the same host, it works the first time
but not the second ?
When I do this:
<condition property="offline" value="0">
<isreachable host="${sunmdm_ap1_hostname}" timeout="10000"/>
</condition>
<condition property="offline" value="0">
<isreachable host="${sunmdm_ap2_hostname}" timeout="10000"/>
</condition>
it worked fine.
Any help is appreciated