Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not retrieve ringbuffer service to destroy event journal" on shutdown #11662

Closed
heliheli opened this issue Oct 25, 2017 · 1 comment
Closed

Comments

@heliheli
Copy link

@heliheli heliheli commented Oct 25, 2017

hazelcast 3.9
When the method HazelcastInstance.shutdown() is called, i got a lot of errors like

[2017-10-25 19:37:54] 6655 DEBUG [main] c.h.m.i.j.RingbufferMapEventJournalImpl - [172.26.1.29]:5701 [dev] [3.9] Could not retrieve ringbuffer service to destroy event journal DefaultObjectNamespace{service='hz:impl:mapService', objectName=test1} com.hazelcast.spi.exception.RetryableHazelcastException: HazelcastInstance[[172.26.1.29]:5701] is not active!
	at com.hazelcast.spi.impl.NodeEngineImpl.getService(NodeEngineImpl.java:385)
	at com.hazelcast.map.impl.journal.RingbufferMapEventJournalImpl.getRingbufferService(RingbufferMapEventJournalImpl.java:201)
	at com.hazelcast.map.impl.journal.RingbufferMapEventJournalImpl.destroy(RingbufferMapEventJournalImpl.java:96)
	at com.hazelcast.map.impl.PartitionContainer.clear(PartitionContainer.java:221)
	at com.hazelcast.map.impl.MapServiceContextImpl.clearPartitions(MapServiceContextImpl.java:344)
	at com.hazelcast.map.impl.MapServiceContextImpl.shutdown(MapServiceContextImpl.java:414)
	at com.hazelcast.map.impl.MapManagedService.shutdown(MapManagedService.java:67)
	at com.hazelcast.map.impl.MapService.shutdown(MapService.java:121)
	at com.hazelcast.spi.impl.servicemanager.impl.ServiceManagerImpl.shutdownService(ServiceManagerImpl.java:305)
	at com.hazelcast.spi.impl.servicemanager.impl.ServiceManagerImpl.shutdown(ServiceManagerImpl.java:296)
	at com.hazelcast.spi.impl.NodeEngineImpl.shutdown(NodeEngineImpl.java:493)
	at com.hazelcast.instance.Node.shutdownServices(Node.java:473)
	at com.hazelcast.instance.Node.shutdown(Node.java:447)
	at com.hazelcast.instance.LifecycleServiceImpl.shutdown(LifecycleServiceImpl.java:98)
	at com.hazelcast.instance.LifecycleServiceImpl.shutdown(LifecycleServiceImpl.java:81)
	at com.hazelcast.instance.HazelcastInstanceProxy.shutdown(HazelcastInstanceProxy.java:292)
	at TestShutdown.testShutdown(TestShutdown.java:17)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Example:

import com.hazelcast.config.Config;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import org.junit.Test;

public class TestShutdown {

	@Test
	public void testShutdown() {
		final Config config = new Config();
		config.setProperty("hazelcast.logging.type", "slf4j");
		final HazelcastInstance server = Hazelcast.newHazelcastInstance(config);
		server.getMap("test1").put(1L, "test1");
		server.shutdown();
	}
}
@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Oct 25, 2017

Hi @heliheli !

This error can be ignored as the node is shutting down. Please increase the log level for the com.hazelcast.map.impl.journal.RingbufferMapEventJournalImpl and com.hazelcast.cache.impl.journal.RingbufferCacheEventJournalImpl class. We will improve on this in 3.9.1

@mmedenjak mmedenjak self-assigned this Oct 25, 2017
@mmedenjak mmedenjak added this to the 3.9.1 milestone Oct 25, 2017
mmedenjak added a commit to mmedenjak/hazelcast that referenced this issue Oct 25, 2017
Logs the error that the ringbuffer service cannot be retrieved if the
instance is already shutting down.

Fixes: hazelcast#11662
mmedenjak added a commit to mmedenjak/hazelcast that referenced this issue Oct 25, 2017
Logs the error that the ringbuffer service cannot be retrieved only if
the instance not shutting down. If the instance is shutting down, we
assume that the ringbuffers will be reset anyway.

Fixes: hazelcast#11662
mmedenjak added a commit to mmedenjak/hazelcast that referenced this issue Oct 26, 2017
Logs the error that the ringbuffer service cannot be retrieved only if
the instance not shutting down. If the instance is shutting down, we
assume that the ringbuffers will be reset anyway.

Fixes: hazelcast#11662

(cherry picked from commit 5f9ec24)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.