Upgrading from 3.5.8 to 4.0.3 fails for existing database

This is for a single instance setup.

Logs say: Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3)

So does this mean that existing databases can not be migrated?

Detailed logs:

2020-04-01 07:12:15.115+0000 INFO [o.n.k.i.s.DatabaseMigrator] [graph1] Starting upgrade of database
2020-04-01 07:12:15.123+0000 WARN [o.n.k.d.Database] [graph1] Exception occurred while starting the database. Trying to stop already started components. Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3).
org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3).
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getVersionFromResult(StoreUpgrader.java:261)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrate(StoreUpgrader.java:194)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:146)
at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:96)
at org.neo4j.kernel.database.Database.upgradeStore(Database.java:506)
at org.neo4j.kernel.database.Database.start(Database.java:354)
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:187)
at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:132)
at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64)
at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39)
at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124)
at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
at org.neo4j.server.database.CommunityGraphFactory.newDatabaseManagementService(CommunityGraphFactory.java:36)
at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
2020-04-01 07:12:15.125+0000 ERROR [o.n.d.d.DefaultDatabaseManager] Failed to start database: graph1 An error occurred! Unable to start database with name graph1.
org.neo4j.dbms.api.DatabaseManagementException: An error occurred! Unable to start database with name graph1.
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:191)
at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:132)
at org.neo4j.dbms.database.DefaultDatabaseManager.initialiseDefaultDatabase(DefaultDatabaseManager.java:64)
at org.neo4j.dbms.database.DefaultDatabaseInitializer.start0(DefaultDatabaseInitializer.java:39)
at org.neo4j.kernel.lifecycle.SafeLifecycle.transition(SafeLifecycle.java:124)
at org.neo4j.kernel.lifecycle.SafeLifecycle.start(SafeLifecycle.java:138)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:145)
at org.neo4j.server.database.CommunityGraphFactory.newDatabaseManagementService(CommunityGraphFactory.java:36)
at org.neo4j.server.database.LifecycleManagingDatabaseService.start(LifecycleManagingDatabaseService.java:88)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:114)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:89)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: java.lang.RuntimeException: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3).
at org.neo4j.kernel.database.Database.start(Database.java:478)
at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:187)
... 17 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3).
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.getVersionFromResult(StoreUpgrader.java:261)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrate(StoreUpgrader.java:194)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:146)
at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:96)
at org.neo4j.kernel.database.Database.upgradeStore(Database.java:506)
at org.neo4j.kernel.database.Database.start(Database.java:354)
... 18 more

Same here!
I tried to go from 3.5.8 to 4.0.3, from 3.5.14 to 4.0.3 and from 3.5.17 to 4.0.3 ... nothing worked, always this error:

Not possible to upgrade a store with version 'v0.A.8' to current store version SF4.0.0 (Neo4j 4.0.3)

Is there a solution to this problem?

1 Like

The errors you're encountering do indicate a problem, in that Neo4j 3.5.x should be using store version 'v0.A.9' (which was first introduced in Neo4j 3.4.0). This means that the stores you're using must have missed a migration much earlier, coming from a pre-3.4.0 version.

You should first start the store in 3.5.17 with dbms.allow_upgrade=true in your neo4j.conf, and monitor the startup to ensure the migration succeeds. At that point your format version should be 0.A.9 and ready for a subsequent migration for Neo4j 4.0.x

I did upgrade to 3.5.14 ... but now after starting 3.5.17 with the data from the 3.5.14 AND allow_upgrade THAT data also works in 4.0.3 with allow_upgrade ... interesting