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

Zookeeper exception when closing Vertx #67

Open
neterium opened this issue May 29, 2018 · 0 comments
Open

Zookeeper exception when closing Vertx #67

neterium opened this issue May 29, 2018 · 0 comments

Comments

@neterium
Copy link

I'm using Vertx 3.5.1 with:

  • A zookeeper cluster manager
  • A zookeeper service discover (using the same zk cluster)

At startup, I'm auto registering to ZK, and I've also added a shutdown hook to properly unregister before closing vertx with vertx.close().

However, in the console, I have the following exceptions:

2018-05-29 22:18:23.433  INFO 18164 --- [tor-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl        : backgroundOperationsLoop exiting
2018-05-29 22:18:23.454  INFO 18164 --- [d-0-EventThread] org.apache.zookeeper.ZooKeeper           : Session: 0x163a2b7edec0028 closed
2018-05-29 22:18:23.462 ERROR 18164 --- [d-0-EventThread] o.a.c.f.imps.CuratorFrameworkImpl        : Background exception was not retry-able or retry gave up

java.lang.IllegalStateException: instance must be started before calling this method
	at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176) ~[curator-client-2.12.0.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:359) [curator-framework-2.12.0.jar:na]
	at io.vertx.spi.cluster.zookeeper.impl.ZKMap.lambda$null$17(ZKMap.java:272) ~[vertx-zookeeper-3.5.1.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:749) [curator-framework-2.12.0.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:522) [curator-framework-2.12.0.jar:na]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:177) [curator-framework-2.12.0.jar:na]
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:598) [zookeeper-3.4.9.jar:3.4.9-1757313]
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505) [zookeeper-3.4.9.jar:3.4.9-1757313]

2018-05-29 22:00:57.417  INFO 30796 --- [ntloop-thread-8] com.neterium.context.ClusterContext      : Vertx cluster closed.
2018-05-29 22:00:57.418 ERROR 30796 --- [d-0-EventThread] o.a.c.f.imps.CuratorFrameworkImpl        : Background exception was not retry-able or retry gave up

java.lang.IllegalStateException: instance must be started before calling this method
	at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176) ~[curator-client-2.12.0.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:359) [curator-framework-2.12.0.jar:na]
	at io.vertx.spi.cluster.zookeeper.impl.ZKMap.lambda$null$17(ZKMap.java:272) ~[vertx-zookeeper-3.5.1.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:749) [curator-framework-2.12.0.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:522) [curator-framework-2.12.0.jar:na]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$2.processResult(GetChildrenBuilderImpl.java:177) [curator-framework-2.12.0.jar:na]
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:598) [zookeeper-3.4.9.jar:3.4.9-1757313]
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505) [zookeeper-3.4.9.jar:3.4.9-1757313]

2018-05-29 22:00:57.418 ERROR 30796 --- [d-0-EventThread] o.a.c.framework.recipes.cache.TreeCache  : 

java.lang.IllegalStateException: instance must be started before calling this method
	at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176) ~[curator-client-2.12.0.jar:na]
	at org.apache.curator.framework.imps.CuratorFrameworkImpl.getChildren(CuratorFrameworkImpl.java:391) ~[curator-framework-2.12.0.jar:na]
	at org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.doRefreshChildren(TreeCache.java:258) ~[curator-recipes-2.12.0.jar:na]
	at org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.refreshChildren(TreeCache.java:246) ~[curator-recipes-2.12.0.jar:na]
	at org.apache.curator.framework.recipes.cache.TreeCache$TreeNode.process(TreeCache.java:346) ~[curator-recipes-2.12.0.jar:na]
	at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:62) [curator-framework-2.12.0.jar:na]
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530) [zookeeper-3.4.9.jar:3.4.9-1757313]
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505) [zookeeper-3.4.9.jar:3.4.9-1757313]

Please note that :

  • I did not have that issue when using Hazelcast as cluster manager.
  • I tried to close the service discovery first, without success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant