I am trying to use the System.isHostReachable method and it seems to be working for some ip addreses and hostnames but others it is failing. I have connected to the vco host and I am able to ping the failing addresses successfully from the command prompt. Is there some limitation to what the System call can see or do I need to tweak something in the configuration?
There is no limitations to what this system call can see.
Scripting call
System.isHostReachable(hostOrIp, timeout);
is equivalent to this standard Java call
InetAddress.getByName(hostOrIp).isReachable(timeout);
My suggestion is to try to increase timeout parameter from its default value 1000 milliseconds to a larger value, for example 3000 milliseconds.
-Ilian
Sorry to bring back the old one.
Am having the same issue to.
What I ended up doing is writing an action that does a ping test specifically first. If that doesn't return true it runs a System.isHostReachable. isHostReachable attempts a tcp connect so in some cases one test will fail. If either works I return true.
Paul