You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by David Li <da...@gmail.com> on 2017/05/18 09:20:40 UTC

How to detect if Ignite server nodes are connectable

Hi all,

TcpDiscoveryVmIpFinder vmIpFinder = new TcpDiscoveryVmIpFinder();
List<String> addresses = new ArrayList<>();
addresses.add("localhost");
vmIpFinder.setAddresses(addresses);

TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi();
discoverySpi.setIpFinder(vmIpFinder);

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(discoverySpi);
cfg.setClientMode(true);
cfg.setGridName(UUID.randomUUID().toString());
Ignite ignite = Ignition.start(cfg);


When connect to an ignite server node as per code above, if failed to connect,

the program will just hang there and ignite will try to connect again every 5

minutes. Is it possible to let ignite fail immediately and return to my code,

so I can handle the failure myself?


BRs,

David

Re: How to detect if Ignite server nodes are connectable

Posted by vkulichenko <va...@gmail.com>.
Hi David,

You can use TcpDiscoverySpi#joinTimeout for this.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-detect-if-Ignite-server-nodes-are-connectable-tp12992p13000.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.