0
votes

So I have just set up an HA environment where I have a master server and instances of an application using Neo4J embedded talking to that cluster. Everything seems to work if the state of both databases is the same.

However if I delete all data from my slave instance, and have it join the cluster, I expect the data from the cluster to propagate into the slave instance. Instead I get errors with what appears to be Neo4J spatial. I have Neo4J spatial in my application, and the server plugin installed in the on the master server side.

An example of the stack trace I get:

2015-10-19 15:10:27.096+0000 ERROR [org.neo4j]: Exception when stopping org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556 org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V at org.neo4j.kernel.lifecycle.Lifecycles$1.stop(Lifecycles.java:55) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.stop(Lifecycle.java:75) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) 2015-10-19 15:10:27.102+0000 ERROR [org.neo4j]: Lifecycle exception Failed to transition component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' from STOPPED to SHUTTING_DOWN. Please see attached cause exception org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' from STOPPED to SHUTTING_DOWN. Please see attached cause exception at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:559) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:200) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) Caused by: java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.shutdown()V at org.neo4j.kernel.lifecycle.Lifecycles$1.shutdown(Lifecycles.java:64) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.shutdown(Lifecycle.java:81) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:555) ... 18 more 2015-10-19 15:10:27.103+0000 ERROR [org.neo4j]: Chained lifecycle exception Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' failed to stop. Please see attached cause exception. org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@ae93556' failed to stop. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:532) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:185) at org.neo4j.kernel.NeoStoreDataSource.stop(NeoStoreDataSource.java:1160) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:155) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:137) at org.neo4j.kernel.ha.cluster.SwitchToSlave.stopServicesAndHandleBranchedStore(SwitchToSlave.java:521) at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistency(SwitchToSlave.java:357) at org.neo4j.kernel.ha.cluster.SwitchToSlave.executeConsistencyChecks(SwitchToSlave.java:316) at org.neo4j.kernel.ha.cluster.SwitchToSlave.switchToSlave(SwitchToSlave.java:219) at org.neo4j.kernel.ha.cluster.HighAvailabilityModeSwitcher$2.run(HighAvailabilityModeSwitcher.java:328) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.neo4j.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:99) Caused by: java.lang.AbstractMethodError: org.neo4j.gis.spatial.indexprovider.SpatialIndexImplementation.stop()V at org.neo4j.kernel.lifecycle.Lifecycles$1.stop(Lifecycles.java:55) at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.stop(Lifecycle.java:75) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:527) ... 19 more

Does Neo4j Spatial support replication across instances? Or more specifically restoring the spatial index to a new empty instance that joins the cluster for the first time?

1
This looks like a versioning issue. Please make sure that you're version of Neo4j and the Spatial extension fit together.Stefan Armbruster
So I am using Neo4J 2.2.5 and version 0.14-neo4j-2.2.3 for neo4j spatial. I tried to put 0.14-neo4j-2.2.5 spatial on both the master and in my application but I get the same error. This is only when I have an empty application joining an existing cluster. If both master and slave are empty, or both master and slave have the same database, it seems to work just fine.lordmj
I guess it's worth filing an issue with Neo4j spatial for this: github.com/neo4j-contrib/spatial/issues/newStefan Armbruster
Submitting a ticket. Should note that I just stood up another Neo4J server instance. I get the same issue when creating another Neo4J server but is empty. When I restart the server, the server starts but spatial indexes are not copied over.lordmj

1 Answers

0
votes

An update to Neo4j spatial to version 0.15-neo4j-2.2.6 fixes this issue. So you need to be using Neo4j 2.2.6 in order to have Spatial indexes replicate properly