0

I'm using the configuration below, with a cluster running on my local machine with the same port range as below (37500..37509)

IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setClientMode(true); TcpDiscoverySpi spi = new TcpDiscoverySpi(); TcpDiscoveryMulticastIpFinder ipFinder = new TcpDiscoveryMulticastIpFinder(); ipFinder.setMulticastGroup("127.0.0.1"); // Set initial IP addresses. // Note that you can optionally specify a port or a port range. ipFinder.setAddresses(Arrays.asList("127.0.0.1:37500..37509")); spi.setLocalPort(37508); spi.setLocalPortRange(0); TcpCommunicationSpi commSpi=new TcpCommunicationSpi(); commSpi.setLocalPort(37509); // Overriding discovery SPI. cfg.setDiscoverySpi(spi); // Overriding communication SPI. cfg.setCommunicationSpi(commSpi); try (Ignite ig = Ignition.start(cfg)) { IgniteCache<Integer, String> cache = ig.getOrCreateCache("myCacheName"); cache.put(1, "vlad"); cache.get(1); } 

I'm getting the below error message:

[17:51:14] IP finder returned empty addresses list. Please check IP finder configuration and make sure multicast works on your network. Will retry every 2 secs. 

Any thoughts?

1 Answer 1

3

The error itself is shown because you didn't set the IP finder to the discovery SPI (spi.setIpFinder(ipFinder)).

However, you should also note that DiscoverySpi and CommunicationSpi are two different components and they use different ports. What you did here is bound communication to one of the ports discovery will try to connect to. Port ranges for discovery and communication should not intersect.

Sign up to request clarification or add additional context in comments.

2 Comments

That worked thank you, and I got rid of the CommunicationSpi, what is that for?
It's responsible for all the communication between nodes (requests and responses for cache operations, job executions, etc.).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.