我正在研究《七个星期的七个数据库》一书的Neo4j
部分。我现在是第2天的“大数据”部分。我能够将“电影数据库”数据集示例(cineasts_12k_movies_50k_actors.db
)下载并移动到data/databases
。然后,我将dbms.active_database=graph.db
注释掉并添加行
dbms.active_database=movies.db
在neo4j.conf
的{{1}}文件中。
根据书中的说明,我应该进入同一文件(/conf folder
)中以取消注释:
neo4j.conf
,但是该行在文件中不存在。并将其添加到配置文件中引发以下错误:
#dbms.allow_format_migrations=true
从在线研究来看,(C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise-3.4.6-windows\neo4j-enterprise-
3.4.6\bin>neo4j console
2018-08-24 03:37:28.996+0000 WARN Unknown config option: dbms.allow_format_migr
ations
2018-08-24 03:37:29.076+0000 INFO ======== Neo4j 3.4.6 ========
2018-08-24 03:37:29.170+0000 INFO Starting...
2018-08-24 03:37:33.672+0000 INFO Initiating metrics...
2018-08-24 03:37:34.180+0000 ERROR Failed to start Neo4j: Starting Neo4j failed:
Component 'org.neo4j.server.database.LifecycleManagingDatabase@6db66836' was su
ccessfully initialized, but failed to start. Please see the attached cause excep
tion "Unknown store version 'v0.A.3'". Starting Neo4j failed: Component 'org.neo
4j.server.database.LifecycleManagingDatabase@6db66836' was successfully initiali
zed, but failed to start. Please see the attached cause exception "Unknown store
version 'v0.A.3'".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.n
eo4j.server.database.LifecycleManagingDatabase@6db66836' was successfully initia
lized, but failed to start. Please see the attached cause exception "Unknown sto
re version 'v0.A.3'".
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStart
upError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:220)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111
)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntry
Point.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.s
erver.database.LifecycleManagingDatabase@6db66836' was successfully initialized,
but failed to start. Please see the attached cause exception "Unknown store ver
sion 'v0.A.3'".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.fact
ory.GraphDatabaseFacadeFactory, C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise
-3.4.6-windows\neo4j-enterprise-3.4.6\data\databases\movies.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:212)
at org.neo4j.kernel.enterprise.EnterpriseGraphDatabase.<init>(Enterprise
GraphDatabase.java:39)
at org.neo4j.server.enterprise.OpenEnterpriseNeoServer.lambda$static$1(O
penEnterpriseNeoServer.java:78)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleMa
nagingDatabase.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.k
ernel.NeoStoreDataSource@4152d38d' was successfully initialized, but failed to s
tart. Please see the attached cause exception "Unknown store version 'v0.A.3'".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataS
ourceManager.java:100)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:208)
... 9 more
Caused by: java.lang.IllegalArgumentException: Unknown store version 'v0.A.3'
at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForVers
ion(RecordFormatSelector.java:101)
at org.neo4j.kernel.impl.store.NeoStores.verifyRecordFormat(NeoStores.ja
va:211)
at org.neo4j.kernel.impl.store.NeoStores.<init>(NeoStores.java:143)
at org.neo4j.kernel.impl.store.StoreFactory.openNeoStores(StoreFactory.j
ava:160)
at org.neo4j.kernel.impl.store.StoreFactory.openAllNeoStores(StoreFactor
y.java:124)
at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageE
ngine.<init>(RecordStorageEngine.java:200)
at org.neo4j.kernel.NeoStoreDataSource.buildStorageEngine(NeoStoreDataSo
urce.java:574)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:434
)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 14 more
2018-08-24 03:37:34.183+0000 INFO Neo4j Server shutdown initiated by request
)似乎是已弃用的配置选项。然后我去了A.1。 https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/上的配置设置,根据我的判断(我自己的结论),我可以取消对#dbms.allow_format_migrations=true
的注释,而不是dbms.allow_upgrade
(尚不可用/现已折旧),但是我遇到以下错误:
dbms.allow_format_migrations
然后,我注释掉了'dbms.allow_upgrade'行并再次运行neo4j控制台以在cmd上启动服务器,并出现以下错误:
C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise-3.4.6-windows\neo4j-enterprise-
3.4.6\bin>neo4j console
2018-08-24 03:42:32.958+0000 INFO ======== Neo4j 3.4.6 ========
2018-08-24 03:42:33.031+0000 INFO Starting...
2018-08-24 03:42:36.413+0000 INFO Initiating metrics...
2018-08-24 03:42:36.787+0000 INFO Starting upgrade of database
2018-08-24 03:42:36.807+0000 ERROR Failed to start Neo4j: Starting Neo4j failed:
Component 'org.neo4j.server.database.LifecycleManagingDatabase@759fad4' was suc
cessfully initialized, but failed to start. Please see the attached cause except
ion "Not possible to upgrade a store with version 'v0.A.3' to current store vers
ion `v0.A.9` (Neo4j 3.4.6).". Starting Neo4j failed: Component 'org.neo4j.server
.database.LifecycleManagingDatabase@759fad4' was successfully initialized, but f
ailed to start. Please see the attached cause exception "Not possible to upgrade
a store with version 'v0.A.3' to current store version `v0.A.9` (Neo4j 3.4.6)."
.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.n
eo4j.server.database.LifecycleManagingDatabase@759fad4' was successfully initial
ized, but failed to start. Please see the attached cause exception "Not possible
to upgrade a store with version 'v0.A.3' to current store version `v0.A.9` (Neo
4j 3.4.6).".
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStart
upError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:220)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111
)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntry
Point.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.s
erver.database.LifecycleManagingDatabase@759fad4' was successfully initialized,
but failed to start. Please see the attached cause exception "Not possible to up
grade a store with version 'v0.A.3' to current store version `v0.A.9` (Neo4j 3.4
.6).".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.fact
ory.GraphDatabaseFacadeFactory, C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise
-3.4.6-windows\neo4j-enterprise-3.4.6\data\databases\movies.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:212)
at org.neo4j.kernel.enterprise.EnterpriseGraphDatabase.<init>(Enterprise
GraphDatabase.java:39)
at org.neo4j.server.enterprise.OpenEnterpriseNeoServer.lambda$static$1(O
penEnterpriseNeoServer.java:78)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleMa
nagingDatabase.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.k
ernel.NeoStoreDataSource@cf65451' was successfully initialized, but failed to st
art. Please see the attached cause exception "Not possible to upgrade a store wi
th version 'v0.A.3' to current store version `v0.A.9` (Neo4j 3.4.6).".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataS
ourceManager.java:100)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:208)
... 9 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradin
gStoreVersionException: Not possible to upgrade a store with version 'v0.A.3' to
current store version `v0.A.9` (Neo4j 3.4.6).
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradea
ble(UpgradableDatabase.java:122)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateStore(Store
Upgrader.java:141)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(St
oreUpgrader.java:122)
at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(Databas
eMigrator.java:100)
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.j
ava:564)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:419
)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 14 more
2018-08-24 03:42:36.810+0000 INFO Neo4j Server shutdown initiated by request
请就此提出建议,以便我可以使用示例数据集(然后继续进行其他示例数据集的练习)。 多谢您的宝贵时间。
注意:我运行的是Windows 7 OS计算机;我的C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise-3.4.6-windows\neo4j-enterprise-
3.4.6\bin>neo4j console
2018-08-24 03:49:20.922+0000 INFO ======== Neo4j 3.4.6 ========
2018-08-24 03:49:21.008+0000 INFO Starting...
2018-08-24 03:49:24.533+0000 INFO Initiating metrics...
2018-08-24 03:49:25.557+0000 ERROR Failed to start Neo4j: Starting Neo4j
failed:
Component 'org.neo4j.server.database.LifecycleManagingDatabase@9cd25ff' was suc
cessfully initialized, but failed to start. Please see the attached cause except
ion "Unknown store version 'v0.A.3'". Starting Neo4j failed: Component 'org.neo4
j.server.database.LifecycleManagingDatabase@9cd25ff' was successfully initialize
d, but failed to start. Please see the attached cause exception "Unknown store v
ersion 'v0.A.3'".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.n
eo4j.server.database.LifecycleManagingDatabase@9cd25ff' was successfully initial
ized, but failed to start. Please see the attached cause exception "Unknown stor
e version 'v0.A.3'".
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStart
upError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:220)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:111
)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:79)
at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntry
Point.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.s
erver.database.LifecycleManagingDatabase@9cd25ff' was successfully initialized,
but failed to start. Please see the attached cause exception "Unknown store vers
ion 'v0.A.3'".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:212)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.fact
ory.GraphDatabaseFacadeFactory, C:\Users\w3s\Desktop\NEO4J_HOME\neo4j-enterprise
-3.4.6-windows\neo4j-enterprise-3.4.6\data\databases\movies.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:212)
at org.neo4j.kernel.enterprise.EnterpriseGraphDatabase.<init>(Enterprise
GraphDatabase.java:39)
at org.neo4j.server.enterprise.OpenEnterpriseNeoServer.lambda$static$1(O
penEnterpriseNeoServer.java:78)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleMa
nagingDatabase.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.k
ernel.NeoStoreDataSource@7a11c4c7' was successfully initialized, but failed to s
tart. Please see the attached cause exception "Unknown store version 'v0.A.3'".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:466)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataS
ourceManager.java:100)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(G
raphDatabaseFacadeFactory.java:208)
... 9 more
Caused by: java.lang.IllegalArgumentException: Unknown store version 'v0.A.3'
at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForVers
ion(RecordFormatSelector.java:101)
at org.neo4j.kernel.impl.store.NeoStores.verifyRecordFormat(NeoStores.ja
va:211)
at org.neo4j.kernel.impl.store.NeoStores.<init>(NeoStores.java:143)
at org.neo4j.kernel.impl.store.StoreFactory.openNeoStores(StoreFactory.j
ava:160)
at org.neo4j.kernel.impl.store.StoreFactory.openAllNeoStores(StoreFactor
y.java:124)
at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageE
ngine.<init>(RecordStorageEngine.java:200)
at org.neo4j.kernel.NeoStoreDataSource.buildStorageEngine(NeoStoreDataSo
urce.java:574)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:434
)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSu
pport.java:445)
... 14 more
2018-08-24 03:49:25.563+0000 INFO Neo4j Server shutdown initiated by request
版本是neo4j
;我在trial neo4j-enterprise-3.4.6
提示旁边使用cygwin
终端跟着这本书;我是一个初学者程序员(我不太了解)。另外,这个Error while running Neo4j: Not possible to upgrade a store with version 'v0.A.9' to current store version `v0.A.8` (Neo4j 3.3.1)似乎很相似,但没有帮助(那里没有答案)。
答案 0 :(得分:0)
我认为此问题是由neo4j的版本兼容性引起的。 参见https://neo4j.com/developer/kb/store-format-versions/。
此问题有两种解决方案。一种解决方案是将以前使用的neo4j版本降级为2.1.0。另一个是手动将数据升级到0.A.8。
祝你好运!