在HA模式下使用Neo4j 2.1.8和3节点群集。在主服务器的运行期间,出现以下异常:
org.neo4j.kernel.ha.BranchedDataException: The cluster contains two logically different versions of the database.. This will be automatically resolved. Details: I (machineId:1) think machineId for txId (2679) is (1, 173744858547), but master (machineId:2) says that it's HandshakeResult[author:1, checksum:169449888034, epoch:564397954560447]
at org.neo4j.kernel.ha.cluster.SwitchToSlave.checkDataConsistencyWithMaster(SwitchToSlave.java:593) [neo4j-ha-2.1.8.jar:2.1.8]
看起来它试图恢复,但失败如下所示:
2015-11-20 06:32:29.009+0000 INFO [o.n.k.i.n.x.NeoStoreXaDataSource]: NeoStore closed
2015-11-20 06:32:29.134+0000 INFO [o.n.k.i.t.TxManager]: TM shutting down
2015-11-20 06:32:33.845+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 212ms.
2015-11-20 06:32:41.755+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Closed log db\data.db\index\lucene.log
2015-11-20 06:32:42.425+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 408ms.
2015-11-20 06:32:48.244+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 534ms.
2015-11-20 06:32:49.118+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 345ms.
2015-11-20 06:32:50.163+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 394ms.
2015-11-20 06:32:51.021+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 335ms.
2015-11-20 06:32:51.879+0000 WARN [o.n.k.h.HighlyAvailableGraphDatabase]: GC Monitor: Application threads blocked for 327ms.
2015-11-20 06:32:51.941+0000 WARN [o.n.k.h.c.SwitchToSlave]: Failed while trying to handle branched data
org.neo4j.kernel.impl.util.FileUtils$MaybeWindowsMemoryMappedFileReleaseProblem: java.nio.file.FileSystemException: db\data.db\index\lucene\node\nodeType\_0.fdt: The process cannot access the file because it is being used by another process.
at org.neo4j.kernel.impl.util.FileUtils.deleteFileWithRetries(FileUtils.java:466) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.impl.util.FileUtils.deleteFileWithRetries(FileUtils.java:469) ~[neo4j-kernel-2.1.8.jar:2.1.8]
以下是主人的例外情况:
org.neo4j.graphdb.TransactionFailureException: Timeout waiting for database to allow new transactions. 1 reasons for blocking: Cluster state is 'TO_SLAVE'.
at org.neo4j.kernel.ha.HighlyAvailableGraphDatabase.beginTx(HighlyAvailableGraphDatabase.java:218) ~[neo4j-ha-2.1.8.jar:2.1.8]
下一个来自奴隶:
Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
at org.neo4j.kernel.TopLevelTransaction.close(TopLevelTransaction.java:141) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:112) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at com.genesys.transaction.TxTransaction.finish(TxTransaction.java:103) ~[classes/:na]
... 14 common frames omitted
Caused by: javax.transaction.HeuristicMixedException: Unable to rollback Transaction[eventId=4519,thread=373:'genesys-msg-4',status=STATUS_ROLLING_BACK,resourceCount=2] ---> error in commit: javax.transaction.xa.XAException ---> error code for rollback: 0
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:530) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:385) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.TopLevelTransaction.close(TopLevelTransaction.java:126) ~[neo4j-kernel-2.1.8.jar:2.1.8]
... 16 common frames omitted
Caused by: javax.transaction.xa.XAException: Unknown xid[GlobalId[NEOKERNL|8441255123473722067|4522|3], BranchId[ 52 49 52 49 52 49 ]]
at org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.rollback(XaResourceManager.java:665) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.rollback(XaResourceHelpImpl.java:111) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.impl.transaction.TransactionImpl.doRollback(TransactionImpl.java:581) ~[neo4j-kernel-2.1.8.jar:2.1.8]
at org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:517) ~[neo4j-kernel-2.1.8.jar:2.1.8]
... 18 common frames omitted