Header Photo by Sander Weeteling

How to upgrade neo4j to version 4

I recently upgraded a containerized neo4j instance, when I got the following error message during startup:

2021–06–26 16:14:46.180+0000 ERROR [neo4j/ec6f8aee] Error upgrading database. Database left intact and will likely not be able to start: org.neo4j.storageengine.migration.UpgradeNotAllowedException: Neo4j cannot be started because the database files require upgrading and upgrades are disabled in the configuration. Please set ‘dbms.allow_upgrade’ to ‘true’ in your configuration file and try again.

As the error already indicates, it is required to open the neo4j.conf file (within conf directory) and uncomment the following line:

After restarting, you’ll be able to see the database upgrade process being triggered:

2021–06–26 16:18:05.526+0000 INFO org.neo4j.internal.kernel.api.security.AbstractSecurityLog$SecurityLogLine@33e8694b
2021–06–26 16:18:05.550+0000 INFO [neo4j/ec6f8aee] Starting upgrade of database
2021–06–26 16:18:05.586+0000 INFO [neo4j/ec6f8aee] Migrating Store files (1/8):
2021–06–26 16:18:05.639+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.640+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.640+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.640+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.640+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.641+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.641+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.641+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.642+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.642+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.642+0000 INFO [neo4j/ec6f8aee] Migrating Id files (2/8):
2021–06–26 16:18:05.644+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.644+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.644+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.645+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.645+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.645+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.645+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.646+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.646+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.646+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.647+0000 INFO [neo4j/ec6f8aee] Migrating Index config (3/8):
2021–06–26 16:18:05.649+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.650+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.650+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.650+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.650+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.651+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.651+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.651+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.651+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.652+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.652+0000 INFO [neo4j/ec6f8aee] Migrating Index providers (4/8):
2021–06–26 16:18:05.653+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.654+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.654+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.654+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.655+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.655+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.655+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.655+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.656+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.656+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.656+0000 INFO [neo4j/ec6f8aee] Migrating Native indexes (5/8):
2021–06–26 16:18:05.658+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.658+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.659+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.659+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.659+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.659+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.660+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.660+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.660+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.660+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.661+0000 INFO [neo4j/ec6f8aee] Migrating Fulltext indexes (6/8):
2021–06–26 16:18:05.662+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.663+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.663+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.663+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.663+0000 INFO [neo4j/ec6f8aeq] 50% completed
2021–06–26 16:18:05.663+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.664+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.664+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.664+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.664+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.665+0000 INFO [neo4j/ec6f8aee] Migrating Token indexes (7/8):
2021–06–26 16:18:05.666+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.667+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.667+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.667+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.668+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.668+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.668+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.669+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.669+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.669+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.670+0000 INFO [neo4j/ec6f8aee] Migrating Schema indexes (8/8):
2021–06–26 16:18:05.672+0000 INFO [neo4j/ec6f8aee] 10% completed
2021–06–26 16:18:05.672+0000 INFO [neo4j/ec6f8aee] 20% completed
2021–06–26 16:18:05.673+0000 INFO [neo4j/ec6f8aee] 30% completed
2021–06–26 16:18:05.673+0000 INFO [neo4j/ec6f8aee] 40% completed
2021–06–26 16:18:05.673+0000 INFO [neo4j/ec6f8aee] 50% completed
2021–06–26 16:18:05.673+0000 INFO [neo4j/ec6f8aee] 60% completed
2021–06–26 16:18:05.674+0000 INFO [neo4j/ec6f8aee] 70% completed
2021–06–26 16:18:05.674+0000 INFO [neo4j/ec6f8aee] 80% completed
2021–06–26 16:18:05.674+0000 INFO [neo4j/ec6f8aee] 90% completed
2021–06–26 16:18:05.675+0000 INFO [neo4j/ec6f8aee] 100% completed
2021–06–26 16:18:05.731+0000 INFO [neo4j/ec6f8aee] Starting transaction logs migration.
2021–06–26 16:18:05.788+0000 INFO [neo4j/ec6f8aee] Transaction logs migration completed.
2021–06–26 16:18:05.792+0000 INFO [neo4j/ec6f8aee] Successfully finished upgrade of database, took 242ms
2021–06–26 16:18:05.970+0000 INFO Bolt enabled on 0.0.0.0:1111.
2021–06–26 16:18:06.625+0000 INFO Remote interface available at http://n:2222/
2021–06–26 16:18:06.627+0000 INFO Started.

I recommend creating a backup in case there are any issues during the upgrade procedure.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aymen Furter

Aymen Furter

DevOps – Linux — Kubernetes –Azure — Java — JS — Apache Camel