jexp / store-utils

Utilities to compact, copy, fix, analyse Neo4j stores
Apache License 2.0
93 stars 34 forks source link

Getting error "Node Key constraint requires Neo4j Enterprise Edition" #31

Open rohankharwar opened 6 years ago

rohankharwar commented 6 years ago

Hi,

I am getting an error when trying to do a store copy on version 3.3.3 .

Node Key constraint requires Neo4j Enterprise Edition

Customer has constraints but we are not able to drop the constraint. Even after deleting the whole schema folder its not going away.

So we were trying to perform store copy to fix this issue. But the store copy if giving the following error.

./copy-store.sh enterprise /neo4jdb/data/databases/graph.db /neo4jdb/data/databases/fixed.db
To use your existing Neo4j 3.3.x installation set NEO4J_HOME to your Neo4j directory. Currently set to: /var/lib/neo4j-enterprise-3.3.3/
Usage: copy-store.sh [community|enterprise] source.db target.db [RELS,TO,SKIP] [props,to,skip] [Labels,To,Skip] [Labels,To,Delete,Nodes]
Using: Heap 4G Pagecache 2G Edition 'enterprise' from '/neo4jdb/data/databases/graph.db' to '/neo4jdb/data/databases/fixed.db' skipping labels: '', removing nodes with labels: '' rels: '' props '' Keeping Node Ids:
Please note that you will need this memory (2G + 1G + 4G) as it opens 2 databases one for reading and one for writing.
Copying from /neo4jdb/data/databases/graph.db to /neo4jdb/data/databases/fixed.db ingoring rel-types [] ignoring properties [] ignoring labels [] removing nodes with labels [] keep node ids true
Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /neo4jdb/data/databases/graph.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:126)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:137)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:130)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:107)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:193)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:75)
    at org.neo4j.tool.StoreCopy.getHighestNodeId(StoreCopy.java:120)
    at org.neo4j.tool.StoreCopy.copyStore(StoreCopy.java:73)
    at org.neo4j.tool.StoreCopy.main(StoreCopy.java:48)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine@427a12b6' was successfully initialized, but failed to start. Please see the attached cause exception "Node Key constraint requires Neo4j Enterprise Edition".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:466)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:521)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:100)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:207)
    ... 9 more
Caused by: java.lang.IllegalStateException: Node Key constraint requires Neo4j Enterprise Edition
    at org.neo4j.kernel.impl.constraints.StandardConstraintSemantics.readNonStandardConstraint(StandardConstraintSemantics.java:88)
    at org.neo4j.kernel.impl.constraints.StandardConstraintSemantics.readConstraint(StandardConstraintSemantics.java:79)
    at org.neo4j.kernel.impl.api.store.SchemaCache.addSchemaRule(SchemaCache.java:151)
    at org.neo4j.kernel.impl.api.store.SchemaCache.load(SchemaCache.java:195)
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.loadSchemaCache(RecordStorageEngine.java:431)
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.start(RecordStorageEngine.java:421)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:445)
    ... 17 more
    Suppressed: org.neo4j.kernel.lifecycle.LifecycleException: Exception during graceful attempt to stop partially started component. Please use non suppressed exception to see original component failure.
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:457)
        ... 17 more
    Caused by: java.lang.NullPointerException
        at org.neo4j.kernel.impl.storageengine.impl.recordstorage.id.BufferedIdController.stop(BufferedIdController.java:57)
        at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.stop(RecordStorageEngine.java:445)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:453)
        ... 17 more

1 CommentCollapse

I am able to reproduce this issue by loading some data and create a NodeKey constraint in the database and unique constraint. Thanks, Rohan

codyAnivive commented 5 years ago

Any update on this we are getting the same issue

InverseFalcon commented 4 years ago

Still present for 3.5.11, in addition also getting similar messages when existence constraints are present.

tomswinkels commented 4 years ago

@rohankharwar first you need to delete all the indexes.