将neo4j数据库从2.0.1升级到2.1.3失败 [英] Upgrading a neo4j database from 2.0.1 to 2.1.3 fails
问题描述
我正在尝试将Windows上运行的neo4j存储从2.0.1升级到2.1.3.
I'm trying to upgrade my neo4j store, running on windows, from 2.0.1 to 2.1.3.
从工作的2.0.1开始,我做了什么.环境,如下所示:
What i have done, starting with a working 2.0.1. environment, is the following:
- .\ 2.0.1 \ bin \ neo4jinstall.bat删除
- xcopy.\ 2.0.1 \ data \ findsi.graphdb.\ 2.1.3 \ data \ findsi.graphdb
- .\ 2.1.3 \ bin \ neo4jinstall.bat安装
这将失败,并显示以下消息:
Detected incorrectly shut down database, performing recovery..
This will fail with the message:
Detected incorrectly shut down database, performing recovery..
我(2.1.3)的messages.log文件告诉我:
My (2.1.3) messages.log file tells me this:
2014-08-11 09:45:46.352+0000 ERROR [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@3198c7f6' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource@4d8088da' was successfully initialized, but failed to start. Please see attached cause exception.: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean state.
2014-08-11 09:45:46.352+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
2014-08-11 09:45:46.352+0000 ERROR [o.n.s.e.EnterpriseBootstrapper]: Failed to start Neo Server on port [7474]
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\NEO4J-~1.3\data\findsi.graphdb
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:221) ~[neo4j-server-2.1.3.jar:2.1.3]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:103) [neo4j-server-2.1.3.jar:2.1.3]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:57) [neo4j-server-2.1.3.jar:2.1.3]
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, C:\NEO4J-~1.3\data\findsi.graphdb
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:362) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:123) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:65) ~[neo4j-server-2.1.3.jar:2.1.3]
at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:71) ~[neo4j-server-2.1.3.jar:2.1.3]
at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:357) ~[neo4j-server-2.1.3.jar:2.1.3]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:154) ~[neo4j-server-2.1.3.jar:2.1.3]
... 2 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager@3198c7f6' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:339) ~[neo4j-kernel-2.1.3.jar:2.1.3]
... 8 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource@4d8088da' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:164) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.1.3.jar:2.1.3]
... 10 common frames omitted
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UpgradingStoreVersionNotFoundException: 'neostore.nodestore.db' does not contain a store version, please ensure that the original database was shut down in a clean state.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:76) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.needsMigration(StoreMigrator.java:103) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getParticipantsEagerToMigrate(StoreUpgrader.java:241) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:129) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:350) ~[neo4j-kernel-2.1.3.jar:2.1.3]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.1.3.jar:2.1.3]
... 13 common frames omitted
现在,即使我使用的是旧版本,如果我执行.\2.0.1\bin\neo4jinstall.bat install
,一切都将再次正常运行.我的猜测是,它与实际数据库无关.
Now, if i do .\2.0.1\bin\neo4jinstall.bat install
everything works fine again, albeit with the old version. My guess is, that it has not to do with the actual database.
如文档所述,我通过在2.1.3环境中设置allow_store_upgrade=true
进行了显式升级的设置.
As the documentation states, i did setup for an explicit upgrade by setting allow_store_upgrade=true
in my 2.1.3 environment.
我不愿意手动更改数据库文件夹中的内容,但是我确实需要升级,因为它解决了我一直在努力解决的一些性能问题.
I'm reluctant to manually change things in my database folder, but i do need the upgrade, as it solves some performance issues i have been struggling with.
推荐答案
可能有2个问题
- 您是否进行过xcopy/r(即递归)操作?
- Windows会强行终止服务,即无法正确关闭服务
因此,在2.0.1启动时,它总是必须执行恢复,而2.0.3拒绝在非完全关闭的数据库上启动.
So on 2.0.1 at startup it always has to perform recovery and 2.0.3 refuses to start on a non-cleanly shut down database.
您可以通过
bin\Neo4jShell.bat -path data\findsi.graphdb
与您的数据库一起使用,然后在复制之前用quit
干净地将其停止.
with your db and then stopping it cleanly with quit
before copying it over.
这篇关于将neo4j数据库从2.0.1升级到2.1.3失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!