Neo4j: How do you rebuild the label scan store?

I shut down my Neo4J instance every night to do a backup. This morning I found that it failed to start up again:

2015-12-05 03:38:49.326+0000 INFO Successfully shutdown Neo4j Server 2015-12-05 03:38:49.330+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7728902c' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7728902c' was successfully initialized, but failed to start. Please see attached cause exception. org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7728902c' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:67) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234) at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:97) at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48) at org.neo4j.server.CommunityBootstrapper.main(CommunityBootstrapper.java:35) Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@7728902c' was successfully initialized, but failed to start. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:462) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:194) ... 3 more Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /lustre/scratch116/vr/vrpipe/neo4j/production/db at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143) at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43) at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108) at org.neo4j.server.CommunityNeoServer$1.newGraphDatabase(CommunityNeoServer.java:66) at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) ... 5 more Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.api.impl.index.LuceneLabelScanStore@28c94a12' failed to initialize. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434) at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102) at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:600) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452) at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111) at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139) ... 10 more Caused by: java.io.IOException: Label scan store could not be read, and needs to be rebuilt. To trigger a rebuild, ensure the database is stopped, delete the files in '/lustre/scratch116/vr/vrpipe/neo4j/production/db/schema/label/lucene', and then start the database again. at org.neo4j.kernel.api.impl.index.LuceneLabelScanStore.init(LuceneLabelScanStore.java:259) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424) ... 19 more

I followed its advice to delete db/schema/label/lucene/*, and the database started up fine, but I can't query any existing nodes or relationships. The web front end says I have no node labels or relationship types. I tried doing match (n)-[r]-() return n,r, but that returns nothing.

How do I get my database back? Perhaps I need to force rebuilding of the lucene indexes somehow?

Answers


  • You took a backup before you deleted it?
  • You only deleted that directory?
  • What does the new startup log look like?
  • How much data do you have in your db?
  • What does this return? match (n) return count(*)

Need Your Help

iOS : Swipe Gesture Push in one ViewController?

ios objective-c swipe swipe-gesture

I want to add two swipe gesture. I did the code, and it's running, my text in the viewcontroller change when i touch the screen.

Providing multiple instances of a form yet processing events one at a time

c# multithreading delegates mutex

I need to be able to let multiple instances of the same form be open as my application can be used in different places at once. On the other hand I need to be able to process the operations during ...