Does the Neo4j version depend on the Ubuntu kernel version?

I installed Neo4j yesterday on my Dell laptop with Ubuntu 22.04 operating system

liv@igor2024:~$ uname -a
Linux igor2024 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

For some reason, the Neo4j version was installed 4.1.13, and not
liv@igor2024:~$ cypher-shell
username: neo4j
password: ********
Connected to Neo4j 4.1.0 at neo4j://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.

liv@igor2024:~$ sudo apt search neo4j
[sudo] password for liv:
Sorting… Done
Full-text search… Done
cypher-shell/stable,stable,now 1:4.1.13 all [installed, automatically]
command line shell for neo4j

libcypher-parser-dev/jammy 0.6.0-1 amd64
Development files for libcypher-parser

libcypher-parser-doc/jammy,jammy 0.6.0-1 all
Documentation for libcypher-parser

libcypher-parser8/jammy 0.6.0-1 amd64
Parsing library for the Cypher query language

neo4j/stable,stable,now 1:4.1.13 all [installed]
graph database server

neo4j-enterprise/stable,stable 1:4.1.13 all
graph database server

python3-pybel/jammy,jammy 0.14.10-1 all
Biological Expression Language

At the same time, on my Ubuntu VPS, we have Neo4j version 5.16.0:
liv@singularity:~$uname -a
Linux singularity 5.15.0-73-fips #80+fips1-Ubuntu SMP Thu Jun 1 20:57:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
liv@singularity:~$ sudo apt search neo4j
[sudo] password for liv:
Sorting... Done
Full Text Search... Done
cypher-shell/stable,now 1:5.16.0 all [installed,automatic]
command line shell for neo4j

libcypher-parser-dev/jammy 0.6.0-1 amd64
Development files for libcypher-parser

libcypher-parser-doc/jammy 0.6.0-1 all
Documentation for libcypher-parser

libcypher-parser8/jammy 0.6.0-1 amd64
Parsing library for the Cypher query language

neo4j/stable,now 1:5.16.0 all [installed]
graph database server

neo4j-enterprise/stable 1:5.16.0 all
graph database server

python3-pybel/jammy 0.14.10-1 all
Biological Expression Language

Questions

  1. Why is this so?
  2. How do I upgrade the laptop version to 5.16.0?

You need to add the neo4j repository to apt before neo4j will show up with apt search. The command required for adding the repository to apt is slightly different for 5.x and the 4.x releases so that people don't unintentionally upgrade neo4j.

The instructions for adding the neo4j repository and installing the latest 5.x neo4j are here:

You didn't include how you added the neo4j repository to apt, but I would guess that your ubuntu 22.04 machine has an outdated sources file in /etc/apt/sources.list.d/ which is causing 4.1 to get installed.

1 Like

Not yet.

wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update

liv@igor2024:~$ wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
--2024-01-24 19:10:34-- https://debian.neo4j.com/neotechnology.gpg.key
Распознаётся debian.neo4j.com (debian.neo4j.com)… [sudo] пароль для liv: 143.204.98.88, 143.204.98.43, 143.204.98.17, ...
Подключение к debian.neo4j.com (debian.neo4j.com)|143.204.98.88|:443... соединение установлено.
HTTP-запрос отправлен. Ожидание ответа… 200 OK
Длина: 6342 (6,2K) [application/pgp-keys]
Сохранение в: ‘STDOUT’

  •               100%[===================>]   6,19K  --.-KB/s    за 0,002s  
    

/2024-01-24 19:10:35 (3,48 MB/s) - записан в stdout [6342/6342]

Попробуйте ещё раз.
[sudo] пароль для liv:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
deb https://debian.neo4j.com stable latest
E: Указаны конфликтующие значения параметра Signed-By из источника https://debian.neo4j.com/ stable: /usr/share/keyrings/neo4j.gpg !=
E: Не удалось прочитать перечень источников.
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt-get update

Help is here https://debian.neo4j.com. I deleted the old version and installed latest version of Neo4j. But while there is no success, the server does not start:

liv@igor2024:~$ sudo neo4j-admin server start --verbose
neo4j 5.16.0
VM Name: OpenJDK 64-Bit Server VM
VM Vendor: Private Build
VM Version: 21.0.1+12-Ubuntu-222.04
JIT compiler: HotSpot 64-Bit Tiered Compilers
VM Arguments: [-Xmx128m, -Dapp.name=neo4j-admin, -Dapp.pid=17176, -Dapp.repo=/usr/share/neo4j/repo, -Dapp.home=/usr/share/neo4j, -Dbasedir=/usr/share/neo4j]
Configuration files used (ordered by priority):
/etc/neo4j/neo4j.conf

Directories in use:
home: /var/lib/neo4j
config: /etc/neo4j
logs: /var/log/neo4j
plugins: /var/lib/neo4j/plugins
import: /var/lib/neo4j/import
data: /var/lib/neo4j/data
certificates: /var/lib/neo4j/certificates
licenses: /var/lib/neo4j/licenses
run: /var/lib/neo4j/run
Starting Neo4j.
Executing command line: /usr/lib/jvm/java-21-openjdk-amd64/bin/java -cp /var/lib/neo4j/plugins/:/etc/neo4j/:/usr/share/neo4j/lib/* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.nio.maxCachedBufferSize=1024 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dlog4j2.disable.jmx=true -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/var/lib/neo4j --config-dir=/etc/neo4j
Started neo4j (pid:17207). It is available at http://localhost:7474
There may be a short delay until the server is ready.

liv@igor2024:~$ sudo neo4j-admin server status --verbose
neo4j 5.16.0
VM Name: OpenJDK 64-Bit Server VM
VM Vendor: Private Build
VM Version: 21.0.1+12-Ubuntu-222.04
JIT compiler: HotSpot 64-Bit Tiered Compilers
VM Arguments: [-Xmx128m, -Dapp.name=neo4j-admin, -Dapp.pid=17262, -Dapp.repo=/usr/share/neo4j/repo, -Dapp.home=/usr/share/neo4j, -Dbasedir=/usr/share/neo4j]
Configuration files used (ordered by priority):
/etc/neo4j/neo4j.conf

org.neo4j.cli.CommandFailedException: Neo4j is not running.
at org.neo4j.server.startup.Bootloader$Dbms.status(Bootloader.java:529)
at org.neo4j.server.startup.StatusCommand.execute(StatusCommand.java:37)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:123)
at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:42)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.server.startup.Neo4jAdminCommand.main(Neo4jAdminCommand.java:181)
at org.neo4j.server.startup.Neo4jAdminBoot.main(Neo4jAdminBoot.java:30)

liv@igor2024:~$ sudo systemctl status neo4j
● neo4j.service - Neo4j Graph Database
Loaded: loaded (/lib/systemd/system/neo4j.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-01-24 20:21:41 +07; 1s ago
Main PID: 18200 (java)
Tasks: 21 (limit: 4483)
Memory: 102.2M
CPU: 4.023s
CGroup: /system.slice/neo4j.service
└─18200 /usr/bin/java -Xmx128m -classpath "/usr/share/neo4j/lib/:/usr/share/neo4j/etc:/usr/share/neo4j/repo/" -Dapp.name=neo4j -Dapp.pid=18200 -Dapp.repo=/usr/share/neo4j/repo -Dapp.home=/usr/s>

янв 24 20:21:41 igor2024 systemd[1]: Started Neo4j Graph Database.

sudo neo4j-admin server status –verbose

liv@igor2024:~$ sudo neo4j-admin server status --verbose
neo4j 5.16.0
VM Name: OpenJDK 64-Bit Server VM
VM Vendor: Private Build
VM Version: 21.0.1+12-Ubuntu-222.04
JIT compiler: HotSpot 64-Bit Tiered Compilers
VM Arguments: [-Xmx128m, -Dapp.name=neo4j-admin, -Dapp.pid=18290, -Dapp.repo=/usr/share/neo4j/repo, -Dapp.home=/usr/share/neo4j, -Dbasedir=/usr/share/neo4j]
Configuration files used (ordered by priority):
/etc/neo4j/neo4j.conf

org.neo4j.cli.CommandFailedException: Neo4j is not running.
at org.neo4j.server.startup.Bootloader$Dbms.status(Bootloader.java:529)
at org.neo4j.server.startup.StatusCommand.execute(StatusCommand.java:37)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:123)
at org.neo4j.server.startup.Neo4jAdminCommand.call(Neo4jAdminCommand.java:42)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.server.startup.Neo4jAdminCommand.main(Neo4jAdminCommand.java:181)
at org.neo4j.server.startup.Neo4jAdminBoot.main(Neo4jAdminBoot.java:30)

On my VPS:

liv@singularity:~$ sudo neo4j-admin server status --verbose

[sudo] password for liv:

neo4j 5.16.0

VM Name: OpenJDK 64-Bit Server VM

VM Vendor: Private Build

VM Version: 17.0.9+9-Ubuntu-122.04

JIT compiler: HotSpot 64-Bit Tiered Compilers

VM Arguments: [-Xmx128m, -Dapp.name=neo4j-admin, -Dapp.pid=409350, -Dapp.repo=/usr/share/neo4j/repo, -Dapp.home=/usr/share/neo4j, -Dbasedir=/usr/share/neo4j]

Configuration files used (ordered by priority):

/etc/neo4j/neo4j.conf


Neo4j is running at pid 32993

Log is:
2024-01-24 13:30:00.909+0000 INFO Starting...
2024-01-24 13:30:03.130+0000 INFO This instance is ServerId{6002cb86} (6002cb86-5e97-4e00-b05d-e3984f5fbbbb)
2024-01-24 13:30:04.401+0000 INFO ======== Neo4j 5.16.0 ========
2024-01-24 13:30:11.221+0000 ERROR Failed to start Neo4j on localhost:7474.
java.lang.RuntimeException: Error starting Neo4j database server at /var/lib/neo4j/data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:273) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:209) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:38) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:187) [neo4j-5.16.0.jar:5.16.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:99) [neo4j-5.16.0.jar:5.16.0]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:30) [neo4j-5.16.0.jar:5.16.0]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.dbms.database.DefaultSystemGraphInitializer@2e7bf7b7' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to read store with version 'SF4.0.0'. Please make sure that database is migrated properly to be supported by current version of neo4j.".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:364) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:264) ~[neo4j-5.16.0.jar:5.16.0]
... 5 more
Caused by: org.neo4j.graphdb.DatabaseShutdownException: This database is shutdown.
at org.neo4j.kernel.availability.DatabaseAvailabilityGuard.assertDatabaseAvailable(DatabaseAvailabilityGuard.java:154) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginKernelTransaction(GraphDatabaseFacade.java:148) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:117) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:89) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseTransactions.beginTransaction(GraphDatabaseTransactions.java:113) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseTransactions.beginTransaction(GraphDatabaseTransactions.java:107) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseTransactions.beginTransaction(GraphDatabaseTransactions.java:102) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.factory.GraphDatabaseTransactions.beginTx(GraphDatabaseTransactions.java:93) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.SystemGraphComponents.initializeSystemGraph(SystemGraphComponents.java:83) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.DefaultSystemGraphInitializer.initializeSystemGraph(DefaultSystemGraphInitializer.java:38) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.SystemGraphInitializer.start(SystemGraphInitializer.java:27) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:264) ~[neo4j-5.16.0.jar:5.16.0]
... 5 more
Caused by: java.lang.IllegalStateException: Failed to read current store version.
at org.neo4j.kernel.impl.storemigration.StoreMigrator.doUpgradeCheck(StoreMigrator.java:387) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.upgradeIfNeeded(StoreMigrator.java:249) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.Database.upgradeStore(Database.java:784) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.Database.specificStart(Database.java:415) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.AbstractDatabase.start(AbstractDatabase.java:160) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.DatabaseLifecycles.startDatabase(DatabaseLifecycles.java:123) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.DatabaseLifecycles$SystemDatabaseStarter.start(DatabaseLifecycles.java:146) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:264) ~[neo4j-5.16.0.jar:5.16.0]
... 5 more
Caused by: java.lang.IllegalArgumentException: Unable to read store with version 'SF4.0.0'. Please make sure that database is migrated properly to be supported by current version of neo4j.
at org.neo4j.kernel.impl.store.LegacyMetadataHandler.storeIdFromLegacyMetadata(LegacyMetadataHandler.java:146) ~[neo4j-record-storage-engine-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.store.LegacyMetadataHandler.readMetadata44FromStore(LegacyMetadataHandler.java:98) ~[neo4j-record-storage-engine-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.readVersion(RecordStoreVersionCheck.java:74) ~[neo4j-record-storage-engine-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.getAndCheckUpgradeTargetVersion(RecordStoreVersionCheck.java:143) ~[neo4j-record-storage-engine-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.doUpgradeCheck(StoreMigrator.java:379) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.impl.storemigration.StoreMigrator.upgradeIfNeeded(StoreMigrator.java:249) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.Database.upgradeStore(Database.java:784) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.Database.specificStart(Database.java:415) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.kernel.database.AbstractDatabase.start(AbstractDatabase.java:160) ~[neo4j-kernel-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.DatabaseLifecycles.startDatabase(DatabaseLifecycles.java:123) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.dbms.database.DatabaseLifecycles$SystemDatabaseStarter.start(DatabaseLifecycles.java:146) ~[neo4j-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:347) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:91) ~[neo4j-common-5.16.0.jar:5.16.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:264) ~[neo4j-5.16.0.jar:5.16.0]
... 5 more
2024-01-24 13:30:11.225+0000 INFO Neo4j Server shutdown initiated by request
2024-01-24 13:30:11.226+0000 INFO Stopped.