【问题标题】:How to upgrade neo4j from 2.1.8 to 2.3.1如何将 neo4j 从 2.1.8 升级到 2.3.1
【发布时间】:2016-01-18 05:08:43
【问题描述】:

我的 ubuntu ami 上安装了 neo4j 2.1.8。这个版本的 neo4j 的问题是它没有身份验证功能,并且像 DETACH 这样的一些查询不能在这个版本上运行。所以我决定升级我的 neo4j 但失败了。我遵循的步骤是:

  1. 停止正在运行的 neo4j
  2. wget http://neo4j.com/artifact.php?name=neo4j-community-2.3.1-unix.tar.gz
  3. tar -xf artifact.php\?name\=neo4j-community-2.3.1-unix.tar.gz
  4. cd neo4j-community-2.3.1/
  5. sudo vim conf/neo4j.properties 并设置 Neo4j 配置参数 allow_store_upgrade=true
  6. sudo vim conf/neo4j-server.properties 并将数据库路径更改为旧数据库。
  7. cd ../bin
  8. ./neo4j 开始

但不幸的是,我遇到了以下错误

Component 'org.neo4j.server.database.LifecycleManagingDatabase@13401e7' 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@13401e7' 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, /data-dir2/graph.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.NeoStoreDataSource@74c6dcaa' 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.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: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: '/data-dir2/graph.db/neostore.nodestore.db' has a store version number that we cannot upgrade from. Expected 'v0.A.3' but file is version ''.
    at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:96)
    at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:149)
    at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:636)
    at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:527)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)

如果在这个版本(2.1.8)中也可以进行身份​​验证,那么告诉过程,我不必更新我的数据库。

【问题讨论】:

    标签: ubuntu neo4j


    【解决方案1】:

    我想我记得必须从 2.1.x 升级到 2.2.x,然后再升级到 2.3.x 从 2.1.x->2.3.x 的直接升级路径不存在。

    所以基本上,我在最新的 2.2.x 上设置了allow_store_upgrade=true,通过启动服务器升级数据库,关闭,将升级后的数据库复制到 2.3.x 并重复该过程。

    编辑:手册确实表明存在从 2.1.x -> 2.3.x (http://neo4j.com/docs/stable/deployment-upgrading.html#explicit-upgrade) 的直接升级路径,但这对我不起作用。

    【讨论】:

    • 在 windows 中我直接从 2.1.8 升级到 2.3.1 但在 ubuntu 中我遇到了问题。
    • 原来我可以根据手册neo4j.com/docs/stable/… 直接升级,但我不能(在 Mac OSX 上)。可能和你有同样的问题,抱歉我帮不上忙
    【解决方案2】:

    我也尝试从 2.1.8 升级到 2.2.8,但它也失败了。在 Windows 中,从 2.1.8 升级到 2.3.2 可以完美运行。所以我从安装了 neo4j 2.1.8 的 ubuntu 服务器下载数据文件夹(通常是 graph.db),然后用它替换 windows neo4j(2.1.8)的数据文件夹。升级成功后将其升级到 2.3.2 压缩数据文件夹并将其上传到我的 ubuntu 服务器。之后,我在我的 ubuntu 服务器上安装了 neo4j 2.3.2 并编辑 neo4j-server.properties 以更改数据库路径。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-16
      • 2021-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多