2
votes

I have neo4j 2.1.8 installed on my ubuntu ami. The problem with this version of neo4j is that it doesn't have authentication feature and some queries like DETACH can't be run on this verison. So I decided to upgrade my neo4j but failed. The steps which I followed are:

  1. Stop the running 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 and Set the Neo4j configuration parameter allow_store_upgrade=true
  6. sudo vim conf/neo4j-server.properties and change the db path to the old db.
  7. cd ../bin
  8. ./neo4j start

But unfortunately I got following errors

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)

If authentication can also be done in this verison (2.1.8) then tell the process, I will not have to update my db.

2

2 Answers

2
votes

I think I remember having to upgrade from 2.1.x to 2.2.x and then to 2.3.x A direct upgrade path from 2.1.x->2.3.x did not exist.

So basically, I set allow_store_upgrade=true on the latest 2.2.x, upgrade the database by starting the server, shutdown, copy upgraded database to 2.3.x and repeat the process.

EDIT: The manual does indicate that there is a direct upgrade path from 2.1.x -> 2.3.x (http://neo4j.com/docs/stable/deployment-upgrading.html#explicit-upgrade) but this did not work for me.

0
votes

I also try to upgrade from 2.1.8 to 2.2.8 but it also fails. In windows upgradation from 2.1.8 to 2.3.2 works perfectly. So I download data folder(generally graph.db) from my ubuntu server where neo4j 2.1.8 is installed and then replace the data folder of windows neo4j(2.1.8) with it. Then upgrade it to 2.3.2 after successful upgradation make a zip of data folder and upload it to my ubuntu server. After that I installed neo4j 2.3.2 on my ubuntu server and edit the neo4j-server.properties to change the db path.