Cluster: org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException: Unable to find transaction 1 in any of my logical logs: Couldn’t find any log containing 1

When operating a causal cluster, if “the store” (data/databases/graph.db) is removed from a server that was previously a member of the cluster we will get the following exception when that server is started:

java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /path/to/neo4j/data/databases/graph.db

	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:209)
	at org.neo4j.causalclustering.core.CoreGraphDatabase.<init>(CoreGraphDatabase.java:49)
	at org.neo4j.causalclustering.discovery.CoreClusterMember.start(CoreClusterMember.java:149)
	at org.neo4j.causalclustering.scenarios.CoreReplicationIT.shouldReplicateTransactionsToCoreMembers(CoreReplicationIT.java:88)
	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:497)
	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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.neo4j.test.rule.VerboseTimeout$VerboseFailOnTimeout$CallableStatement.call(VerboseTimeout.java:237)
	at org.neo4j.test.rule.VerboseTimeout$VerboseFailOnTimeout$CallableStatement.call(VerboseTimeout.java:228)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.causalclustering.core.state.CoreLife@2b63e070' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to find transaction 1 in any of my logical logs: Couldn't find any log containing 1".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
	at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:205)
	... 16 more
Caused by: java.lang.RuntimeException: org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException: Unable to find transaction 1 in any of my logical logs: Couldn't find any log containing 1
	at org.neo4j.causalclustering.core.state.machines.tx.LastCommittedIndexFinder.getLastCommittedIndex(LastCommittedIndexFinder.java:67)
	at org.neo4j.causalclustering.core.state.machines.tx.RecoverConsensusLogIndex.findLastAppliedIndex(RecoverConsensusLogIndex.java:48)
	at org.neo4j.causalclustering.core.state.machines.CoreStateMachines.installCommitProcess(CoreStateMachines.java:138)
	at org.neo4j.causalclustering.core.state.CoreLife.start(CoreLife.java:82)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
	... 18 more
Caused by: org.neo4j.kernel.impl.transaction.log.NoSuchTransactionException: Unable to find transaction 1 in any of my logical logs: Couldn't find any log containing 1
	at org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore$LogVersionLocator.getLogPosition(PhysicalLogicalTransactionStore.java:223)
	at org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore.getTransactions(PhysicalLogicalTransactionStore.java:83)
	at org.neo4j.causalclustering.core.state.machines.tx.LastCommittedIndexFinder.getLastCommittedIndex(LastCommittedIndexFinder.java:57)
	... 22 more

This exception is thrown because the store is now out of sync with the cluster state.

If we want to have this server rejoin the cluster we need to unbind it from the cluster. We can do this by executing the following command:

neo4j-admin unbind --database=graph.db

We can now start the server and it will be able to rejoin the cluster. ”’

  • Last Modified: 2020-10-15 08:05:54 UTC by Mark Needham.
  • Relevant for Neo4j Versions: 3.1, 3.2.
  • Relevant keywords causal-cluster, exception.