ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel López <d.lope...@gmail.com>
Subject Client & server in the same VM
Date Thu, 14 Jan 2016 10:50:46 GMT
Hi there,

I have an application where I need to share some data between all nodes, so
we created a cluster with REPLICATED caches, so far so good.

There are other pieces of data that we need to use that we don't need/want
to keep local, so we are trying to setup a different cluster and let the
application servers just be clients of that cluster. So I created a
different cluster and specify in the configuration, setClientMode(true).
However, when I start both ignite instances in the application, the second
cluster seems to find the server of the first cluster and decide it's also
part of the cluster, hence defeating the purpose of being "just a client".

So, in the same app:
// Define replicated cluster
igniteReplicatedConfiguration igniteReplicatedConfiguration = new
igniteReplicatedConfiguration.setGridLogger(new Slf4jLogger(log));
tcpReplicatedDiscoveryVmIpFinder.registerAddresses(/* localhost:3806 */ );
... // Cache initialisation etc.
Ignite igniteReplicated = Ignition.start(igniteReplicatedConfiguration);
// Define distributed cluster
igniteDistributedConfiguration igniteDistributedConfiguration = new
igniteDistributedConfiguration.setGridLogger(new Slf4jLogger(log));
tcpDistributedDiscoveryVmIpFinder.registerAddresses(/* localhost:3810 */ );
... // Cache initialisation etc.
Ignite igniteDistributed = Ignition.start(igniteDistributedConfiguration);

When I start the application, I can see this:

[11:12:36] Ignite node started OK (id=43d3eabd, grid=REPLICATED_CLUSTER
[11:12:36] Topology snapshot [ver=1, servers=1, clients=0, CPUs=8,

Just one server, good. I would then expect the app to stop because I have
not started the server (a different app configured to listen at
localhost:3810) for the the DISTRIBUTED_CLUSTER. But instead of stopping, I
see this:

[11:12:38] Ignite node started OK (id=9eff8e55, grid=DISTRIBUTED_CLUSTER
[11:12:38] Topology snapshot [ver=2, servers=1, clients=1, CPUs=8,

If I then start the DISTRIBUTED_CLUSTER server, then the topology updates
and reads 2 servers, 1 client... huh?

If I comment out the first part, where igniteReplicated instance is
created, then I see the expected result:

WARN |2016-01-14T10:40:01,862||TcpDiscoverySpi|IP finder returned empty
addresses list. Please check IP finder configuration and make sure
multicast works on your network. Will retry every 2 secs.
[11:40:01] IP finder returned empty addresses list. Please check IP finder
configuration and make sure multicast works on your network. Will retry
every 2 secs.

and stays there until I start the DISTRIBUTED_CLUSTER server.

I've browsed the documentation and the mailing list archive and I could not
find any other setting that might sound helpful...

Am I missing something?

View raw message