ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinshar <vinsharma.t...@gmail.com>
Subject Ignite instance hangs during restart in client mode
Date Fri, 19 Feb 2016 15:51:19 GMT
Hi,

I was facing a problem due to which i thought that its a good idea to have a
MBean which can do following
1) Restart a embedded client node in an app (we have a custom cache manager
as abstraction over Ignite instance)
2) Can also close or clear caches if required
2) Collate and print metrics the way we may want. 

I implemented above and problem i am facing now is that MBean stops already
running embedded instance successfully but new instance hangs. Thread never
returns. Just to make sure that issue is not in my abstraction and I
replicated the behavior through test case method pasted below. 

My observations are in the end but my guess is that use of same
IgniteConfiguration object is creating problem. This object is mutable and
is mutated by Ignition.start in a way that causes issues if used to start
another instance in client mode.

@Test
	public void test() {
		LOGGER.debug("START");
		IgniteConfiguration config = new IgniteConfiguration();
		config.setClientMode(true);
		List<String> lst = new ArrayList<String>();
		lst.add("127.0.0.1:47500");
		
		TcpDiscoverySpi dspi = new TcpDiscoverySpi();
		TcpDiscoveryMulticastIpFinder finder = new
TcpDiscoveryMulticastIpFinder();
		dspi.setIpFinder(finder);
		finder.setAddresses(lst);
		config.setDiscoverySpi(dspi);
		
		Ignite ignite = Ignition.start(config);
		Cache cache = ignite.getOrCreateCache("TEST");
		cache.put(1,1);
		ignite.close();
		ignite = Ignition.start(config);
		cache =ignite.getOrCreateCache("TEST");
		cache.put(1,1);
		System.out.println(cache.get(1));
		LOGGER.debug("END");
	}

A few observations:-
1) Testcase works fine if nodes being started in test case are not client.
2) Server side topology version logger logs joining and leaving of client
nodes as expected. 2nd client node never leaves.
3) i see below error in logs during start of 2nd client node:- WARNING
[Thread-13] org.apache.ignite.logger.java.JavaLogger.warning Custom H2
serialization is already configured, will override.
4) If i do not use same IgniteConfiguration object then test case works
fine.

Regards,
Vinay Sharma 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-instance-hangs-during-restart-in-client-mode-tp3101.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message