vert-x3 / vertx-zookeeper

Zookeeper based cluster manager implementation
Other
73 stars 67 forks source link

Zookeeper exception when closing Vertx #67

Open neterium opened 6 years ago

neterium commented 6 years ago

I'm using Vertx 3.5.1 with:

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 :