Project: springxd
Issue XD-1983: NodeExists Exception upon container disconnect/reconnect without admin leader
When the container which has modules deployed disconnects/reconnects to the cluster while the admin leader isn't available, following exception is thrown: This is more likely to happen in single-node scenario as there is no admin leader re-election there. In distributed mode, we can always setup HA on admins so that the leadership re-election happens. 20:03:16,307 ERROR DeploymentsPathChildrenCache-0 cache.PathChildrenCache - org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /xd/deployments/modules/allocated/53f41042-8abd-443b-abfb-ba42a24fb9fb/foo.sink.log.1/metadata org.apache.zookeeper.KeeperException.create(KeeperException.java:119) org.apache.zookeeper.KeeperException.create(KeeperException.java:51) org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783) org.apache.curator.framework.imps.CreateBuilderImpl$11.call(CreateBuilderImpl.java:676) org.apache.curator.framework.imps.CreateBuilderImpl$11.call(CreateBuilderImpl.java:660) org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107) org.apache.curator.framework.imps.CreateBuilderImpl.pathInForeground(CreateBuilderImpl.java:656) org.apache.curator.framework.imps.CreateBuilderImpl.protectedPathInForeground(CreateBuilderImpl.java:441) org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:431) org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:44) org.springframework.xd.dirt.server.ContainerRegistrar.writeModuleMetadata(ContainerRegistrar.java:486) org.springframework.xd.dirt.server.ContainerRegistrar.onChildAdded(ContainerRegistrar.java:461) org.springframework.xd.dirt.server.ContainerRegistrar.access$8(ContainerRegistrar.java:426) org.springframework.xd.dirt.server.ContainerRegistrar$DeploymentListener.childEvent(ContainerRegistrar.java:807) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92)
Story points: 3