Article DetailsDetailsHelp Details NOTE: This KB article is not relevant to the 4.4 or higher versions. Please open a ticket using the Neo4j Support Portal in case you encounter inconsistencies in your graph. As part of the backup process, at the end we run a consistency check which validates that the backup copy is valid and should allow for the data to be restored. At times errors may be encountered and the following summarizes example errors and a valid recovery option. If your error is not similar to the errors listed below a support ticket should be entered. Also for any corrective action detailed below, if you are running a clustered Neo4j environment, the recovery must be performed on all instances (master and all slaves). Common Errors Inconsistent Counts in the metadata Description: The below errors are indicative of the count metadata at either the node or relationship corresponding to the actual number of nodes or relationships Recovery: Rebuild the node/relationship count stores. To do this stop the database using bin/neo4j stop and then remove the files named 'neostore.counts.db.\*' from your graph.db/ directory. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: 2016-02-03 09:09:23.181+0000 INFO [org.neo4j]: ERROR: The node count does not correspond with the expected count. CountsEntry[NodeKey[(:label=1)]: 1447977] Inconsistent with: 2775235 2016-02-03 09:09:23.209+0000 INFO [org.neo4j]: ERROR: The relationship count does not correspond with the expected count. CountsEntry[RelationshipKey[()-->()]: 12945949] Inconsistent with: 24654501 Inconsistent Counts among indexes Description: The below errors are indicative of the schema indexes not being representative of the actual data Recovery: Rebuild the indexes. To do this stop the database using bin/neo4j stop and then remove the entire directory of graph.db/schema/index. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: 2016-02-03 09:05:47.945+0000 INFO [org.neo4j]: ERROR: This node was found in the expected index, although multiple times Node[46202,used=true,rel=52588,prop=48020,labels=Inline(0x20004c0007:[7, 19]),light] Inconsistent with: IndexRule[id=18, label=7, kind=INDEX_RULE, provider={key=lucene, version=1.0}, properties=7] 1446139319 2 or 2016-09-22 09:54:23.883-0400 ERROR [o.n.c.ConsistencyCheckService] This index entry refers to a node record that is not in use. IndexEntry[nodeId=20535612] Inconsistent with: Node[20535612,used=false,rel=-1,prop=-1,labels=Inline(0x0:[]),light] Inconsistent Labels Scan Store Description: The below errors are indicative of the schema label store not being representative of the actual data Recovery: Rebuild the labelscanstore. To do this stop the database using bin/neo4j stop and then remove graph.db/neostore.labelscanstore.db. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Pre-3.2 Recovery: Rebuild the label store. To do this stop the database using bin/neo4j stop and then remove the entire directory of graph.db/schema/label. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: ERROR: This node record has a label that is not found in the label scan store entry for this node Node[38279,used=true,rel=74482,prop=76070,labels=Inline(0x2000640005:[5, 25]),light] Inconsistent with: Node[38279,used=true,rel=74482,prop=76070,labels=Inline(0x2000640005:[5, 25]),light] 25 Node not found in the expected index Description: The below errors are indicative of a node that does not exist in an index Recovery: Rebuild the index store. To do this stop the database using bin/neo4j stop and then remove the entire directory of graph.db/schema/index. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: ERROR: This node was not found in the expected index. Node[173873036,used=true,rel=367039674,prop=727337331,labels=Inline(0x1000000000:[0]),light] Inconsistent with: IndexRule[id=11, label=0, kind=CONSTRAINT_INDEX_RULE, provider={key=lucene, version=1.0}, properties=0, owner=12] 15643997911 another node in the unique index with the same property value Description: The below errors are indicative of an index, as a result of a UNIQUE CONSTRAINT, recording a value not the same as the node it originates from Recovery: Rebuild the index store. To do this stop the database using bin/neo4j stop and then remove the entire directory of graph.db/schema/index. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: ERROR There is another node in the unique index with the same property value. Node[20030639,used=true,group=3975185,prop=553971631,labels=Inline(0x2000040000:[0, 1]),light] Inconsistent with: IndexRule[id=13, label=0, kind=CONSTRAINT_INDEX_RULE, provider={key=lucene, version=1.0}, properties=7, owner=14] 497215869 138165680 LabelScanStore mismatches Description: The below errors are indicative of the labelscantore referencing nodes which are no longer in use Recovery: Rebuild the labelscanstore. To do this stop the database using bin/neo4j stop and then remove graph.db/neostore.labelscanstore.db. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Pre-3.2 Recovery: Rebuild the label store. To do this stop the database using bin/neo4j stop and then remove the entire directory of graph.db/schema/label. Restarting Neo4j, via bin/neo4j start, will rebuild these files. Example Error Messages: 2017-06-15 19:53:55.687+0000 ERROR [o.n.c.ConsistencyCheckService] This label scan document refers to a node record that is not in use. NodeLabelRange[idRange=0-64; {Node[0]: Labels[0], Node[1]: Labels[0], Node[2]: Labels[0], Node[3]: Labels[0], Node[4]: ... ... or 2017-06-15 19:53:55.687+0000 WARN : Label index was not properly shutdown and rebuild is required. Label index: neostore.labelscanstore.db Relevant for Neo4j Versions: 2.3, 3.0, 3.1, 3.2. 3.5 Relevant keywords consistency-check,consistency. InformationTitleHow do I resolve Consistency Check errorsArticle Created Date3/15/2024, 10:56 PMURL Name218047648-How-do-I-resolve-Consistency-Check-errorsLast Modified Date3/19/2024, 1:27 PM