欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Neo4j Server shutdown initiated by request最简暴的解决办法。

程序员文章站 2022-05-28 20:30:28
...

 NEO4J启动报错,找了很多帖子,看了文档但是还是看不出123,后来仔细看报错原因,发现关键在于

Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component '[email protected]' was successfully 

initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use".

 意思是说已经初始化完成,再继续初始化就会报错,即使视同install-service或者stop再start都不管用,甚至restart也不可以。那么这个时候只能将%NEO4J_HOME%\data\databases里面的所有文件(包括一些初始化文件和图形文件)都删除掉,然后在运行就OK了。

当然了,这种方法肯定不是很多人想看到的,毕竟删除了之前画的图形关系数据库,但是为了重新运行NEO4J我也只能这样,不过我采用的是JAVA调用NEO4J的API,再运行一遍JAVA程序又可以生成之前的图数据库了。所以对于JAVA调用API的朋友们,这个方法不会有很大的影响。

如果有更好的解决办法我肯定是愿意接受的,毕竟这个方法也不是罪优质的解决办法。

2019-04-02 08:19:29.043+0000 INFO  ======== Neo4j 3.5.3 ========
2019-04-02 08:19:29.051+0000 INFO  Starting...
2019-04-02 08:19:30.329+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component '[email protected]' was successfully initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use". Starting Neo4j failed: Component '[email protected]' was successfully initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component '[email protected]' was successfully initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use".
        at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:184)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:123)
        at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
        at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component '[email protected]' was successfully initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
        at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:177)
        ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory, F:\neo4j\neo4j-community-3.5.3\data\databases
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:216)
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:135)
        at org.neo4j.server.database.CommunityGraphFactory.newGraphDatabase(CommunityGraphFactory.java:40)
        at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:78)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
        ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component '[email protected]' was successfully initialized, but failed to start. Please see the attached cause exception "DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use".
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
        at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:116)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
        at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
        at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:211)
        ... 9 more
Caused by: org.neo4j.kernel.impl.store.InvalidRecordException: DynamicRecord[57,used=false,(0),type=-1,data=byte[],start=true,next=-1] not in use
        at org.neo4j.kernel.impl.store.record.RecordLoad.verify(RecordLoad.java:63)
        at org.neo4j.kernel.impl.store.CommonAbstractStore.verifyAfterReading(CommonAbstractStore.java:1238)
        at org.neo4j.kernel.impl.store.CommonAbstractStore.readRecordFromPage(CommonAbstractStore.java:1107)
        at org.neo4j.kernel.impl.store.CommonAbstractStore.readIntoRecord(CommonAbstractStore.java:1057)
        at org.neo4j.kernel.impl.store.CommonAbstractStore.getRecordByCursor(CommonAbstractStore.java:1038)
        at org.neo4j.kernel.impl.store.CommonAbstractStore.getRecords(CommonAbstractStore.java:1192)
        at org.neo4j.kernel.impl.store.TokenStore.ensureHeavy(TokenStore.java:140)
        at org.neo4j.kernel.impl.store.TokenStore.getStringFor(TokenStore.java:145)
        at org.neo4j.kernel.impl.store.TokenStore.getTokens(TokenStore.java:99)
        at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.<init>(RecordStorageEngine.java:203)
        at org.neo4j.kernel.NeoStoreDataSource.buildStorageEngine(NeoStoreDataSource.java:504)
        at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:357)
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
        ... 14 more
2019-04-02 08:19:30.333+0000 INFO  Neo4j Server shutdown initiated by request

 

相关标签: NEO4J