1

I'm using Neo4j for my rails app. It was working fine a few days ago, but when I tried to start the server today, it wouldn't start. I checked out the log and got this error

Exception in thread "Thread-11" java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@75ed6ed2' failed to stop. Please see attached cause exception. at org.neo4j.helpers.RunCarefully.run(RunCarefully.java:57) at org.neo4j.server.AbstractNeoServer.stop(AbstractNeoServer.java:505) at org.neo4j.server.Bootstrapper$1.run(Bootstrapper.java:181) Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource@75ed6ed2' failed to stop. Please see attached cause exception. at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:484) at org.neo4j.kernel.lifecycle.LifeSupport.stopInstances(LifeSupport.java:165) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:147) at org.neo4j.kernel.impl.transaction.state.DataSourceManager.stop(DataSourceManager.java:132) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:476) at org.neo4j.kernel.lifecycle.LifeSupport.stopInstances(LifeSupport.java:165) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:147) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:188) at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.shutdown(GraphDatabaseFacade.java:285) at org.neo4j.server.database.LifecycleManagingDatabase.stop(LifecycleManagingDatabase.java:111) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.stop(LifeSupport.java:476) at org.neo4j.kernel.lifecycle.LifeSupport.stopInstances(LifeSupport.java:165) at org.neo4j.kernel.lifecycle.LifeSupport.stop(LifeSupport.java:147) at org.neo4j.server.AbstractNeoServer$6.run(AbstractNeoServer.java:531) at org.neo4j.helpers.RunCarefully.run(RunCarefully.java:47) ... 2 more Suppressed: org.neo4j.kernel.lifecycle.LifecycleException: Failed to transition component 'org.neo4j.kernel.impl.pagecache.PageCacheLifecycle@6a82bc90' from STOPPED to SHUTTING_DOWN. Please see attached cause exception at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:515) at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:203) ... 9 more Caused by: java.lang.IllegalStateException: Cannot close the PageCache while files are still mapped: neostore (1 mapping) neostore.counts.db.a (1 mapping) neostore.relationshipgroupstore.db (1 mapping) neostore.schemastore.db (1 mapping) neostore.labeltokenstore.db (1 mapping) neostore.labeltokenstore.db.names (1 mapping) neostore.relationshiptypestore.db (1 mapping) neostore.relationshiptypestore.db.names (1 mapping) neostore.relationshipstore.db (1 mapping) neostore.propertystore.db (1 mapping) neostore.propertystore.db.arrays (1 mapping) neostore.propertystore.db.strings (1 mapping) neostore.propertystore.db.index (1 mapping) neostore.propertystore.db.index.keys (1 mapping) neostore.nodestore.db (1 mapping) neostore.nodestore.db.labels (1 mapping) at org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.close(MuninnPageCache.java:521) at org.neo4j.kernel.impl.pagecache.PageCacheLifecycle.shutdown(PageCacheLifecycle.java:42) at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.shutdown(LifeSupport.java:507) ... 10 more

There's more, but is pretty repetitive. I'm not sure what this means. My log before this is clean with no errors. Any help is appreciated.

Thanks

Brian Underwood
  • 10,746
  • 1
  • 22
  • 34
  • What version of Neo4j? Did your computer shut down unexpectedly or might you have killed the Neo4j process? Neo4j should automatically fix such errors on startup, though. – Brian Underwood Jul 27 '16 at 07:45
  • I'm using version 6.1.0. I tried restarting my computer multiple times, but the error remains. When I run "rake neo4j:start" in my console, it says "Waiting for server to be ready...", but the server never actually starts. – Nimayi Dixit Jul 28 '16 at 18:25
  • This is a differently worded error message that is showing up: "ERROR Failed to start Neo4j: Starting Neo4j failed: Failed to transition component 'org.neo4j.kernel.impl.pagecache.PageCacheLifecycle@7e788982' from STOPPED to SHUTTING_DOWN." – Nimayi Dixit Jul 28 '16 at 18:39
  • 6.1.0 couldn't be your version of Neo4j. Do you mean your version of either the `neo4j` gem or the `neo4j-core` gem? – Brian Underwood Jul 29 '16 at 08:16
  • To use Neo4j in embedded mode with jRuby you would need to also use either the `neo4j-community` gem or the `neo4j-enterprise` gem. The latest version of Neo4j that both of those allow is 2.2.x (there have since been 2.3 and 3.0 releases of Neo4j but we haven't updated the gems yet) – Brian Underwood Jul 29 '16 at 08:17
  • You might also try downloading the Neo4j server and copying (not moving) the database directory there (I think you would need to put the files under the `data/graph.db` folder). Since you're probably not using a version of Neo4j greater that 2.2.x you would need to get the appropriate version of the server, which you can get here: http://neo4j.com/download/other-releases – Brian Underwood Jul 29 '16 at 08:19
  • This error also seems to be with Neo4j itself and not so much the gem, so I might check in on the public Slack group for Neo4j: https://neo4j.com/blog/public-neo4j-users-slack-group/ – Brian Underwood Jul 29 '16 at 08:19
  • Thanks for the suggestions, I've registered for the Slack channel. One other thing that might be of interest: I tried starting from scratch in a new rails project (neo4j 3.0). I am using the devise-neo4j gem. When I create a new user, the user shows up in the database, but cannot be recognized by the app. In the rails console, User.count -> 1, but User.first -> nil. Could this be a related issue? – Nimayi Dixit Jul 29 '16 at 17:28

0 Answers0