Failed to start Neo4j 5.6.0 server on localhost:7474

Neo4j 5.6.0 installing issues in Debian10 Linux on Virtualbox 7 VM

At DBTechNet consortium we have free Debian 10 based sandbox VM
including free editions of databases, tools and programming languages
for students and interested professionals.
The 3.5.8 version of Neo4j Community edition in our sandbox lacks
the latest developments of Neo4j, so we have tried to migrate it to
version 5.6.0, but this far we have not managed to get Neo4j Server running.

Following tests try to capture the current Neo4j 5.6.0 status in our sandbox:

dbtech@debian10:~$ su neo4j
Password:
neo4j@debian10:/home/dbtech$ groups
neo4j adm

neo4j@debian10:/home/dbtech$ neo4j-admin server validate-config
Validating Neo4j configuration: /etc/neo4j/neo4j.conf
No issues found.

Validating server Log4j configuration: /var/lib/neo4j/conf/user-logs.xml
No issues found.

Validating user Log4j configuration: /var/lib/neo4j/conf/server-logs.xml
No issues found.

Validation successful.
neo4j@debian10:/home/dbtech$

neo4j@debian10:/home/dbtech$ neo4j console --verbose
neo4j 5.6.0
VM Name: Java HotSpot(TM) 64-Bit Server VM
VM Vendor: Oracle Corporation
VM Version: 17.0.6+9-LTS-190
JIT compiler: HotSpot 64-Bit Tiered Compilers
VM Arguments: [-Xmx128m, -Dapp.name=neo4j, -Dapp.pid=8136, -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/run/neo4j
Starting Neo4j.
Executing command line: /usr/lib/jvm/jdk-17/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 --console-mode
2023-04-03 15:57:44.124+0000 INFO Starting...
2023-04-03 15:57:45.236+0000 ERROR Failed to start Neo4j on localhost:7474.
java.lang.RuntimeException: java.io.EOFException
at org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:61) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.DefaultIdentityModule.(DefaultIdentityModule.java:40) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.DefaultIdentityModule.(DefaultIdentityModule.java:33) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.graphdb.factory.module.edition.CommunityEditionModule.(CommunityEditionModule.java:134) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:135) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:38) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:171) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:30) ~[neo4j-5.6.0.jar:5.6.0]
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:273) ~[?:?]
at org.neo4j.io.fs.InputStreamReadableChannel.get(InputStreamReadableChannel.java:35) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.ServerIdMarshal.unmarshal0(ServerIdMarshal.java:48) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.ServerIdMarshal.unmarshal0(ServerIdMarshal.java:28) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.io.marshal.SafeChannelMarshal.unmarshal(SafeChannelMarshal.java:36) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.io.state.SimpleFileStorage.readState(SimpleFileStorage.java:51) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:46) ~[neo4j-5.6.0.jar:5.6.0]
... 8 more
2023-04-03 15:57:45.246+0000 INFO Neo4j Server shutdown initiated by request
2023-04-03 15:57:45.247+0000 INFO Stopped.
org.neo4j.server.startup.BootProcessFailureException: Neo4j web server failed to start. See log for more info.
at org.neo4j.server.startup.ProcessManager.waitUntilSuccessful(ProcessManager.java:76)
at org.neo4j.server.startup.BootloaderOsAbstraction$ConsoleProcess.postStart(BootloaderOsAbstraction.java:98)
at org.neo4j.server.startup.AbstractUnixBootloaderOs$UnixConsoleProcess.postStart(AbstractUnixBootloaderOs.java:95)
at org.neo4j.server.startup.ProcessManager.run(ProcessManager.java:52)
at org.neo4j.server.startup.AbstractUnixBootloaderOs.console(AbstractUnixBootloaderOs.java:84)
at org.neo4j.server.startup.UnixBootloaderOs.console(UnixBootloaderOs.java:53)
at org.neo4j.server.startup.Bootloader$Dbms.console(Bootloader.java:456)
at org.neo4j.server.startup.ConsoleCommand.execute(ConsoleCommand.java:41)
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.Neo4jCommand.main(Neo4jCommand.java:41)
at org.neo4j.server.startup.Neo4jBoot.main(Neo4jBoot.java:30)
neo4j@debian10:/home/dbtech$

Listing the neo4j.log file:
neo4j@debian10:/home/dbtech$ cat /var/log/neo4j/neo4j.log
2023-04-03 15:57:44.124+0000 INFO Starting...
2023-04-03 15:57:45.236+0000 ERROR Failed to start Neo4j on localhost:7474.
java.lang.RuntimeException: java.io.EOFException
at org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:61) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.DefaultIdentityModule.(DefaultIdentityModule.java:40) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.DefaultIdentityModule.(DefaultIdentityModule.java:33) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.graphdb.factory.module.edition.CommunityEditionModule.(CommunityEditionModule.java:134) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:135) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:38) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:171) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:30) ~[neo4j-5.6.0.jar:5.6.0]
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:273) ~[?:?]
at org.neo4j.io.fs.InputStreamReadableChannel.get(InputStreamReadableChannel.java:35) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.ServerIdMarshal.unmarshal0(ServerIdMarshal.java:48) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.ServerIdMarshal.unmarshal0(ServerIdMarshal.java:28) ~[neo4j-5.6.0.jar:5.6.0]
at org.neo4j.io.marshal.SafeChannelMarshal.unmarshal(SafeChannelMarshal.java:36) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.io.state.SimpleFileStorage.readState(SimpleFileStorage.java:51) ~[neo4j-io-5.6.0.jar:5.6.0]
at org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:46) ~[neo4j-5.6.0.jar:5.6.0]
... 8 more
2023-04-03 15:57:45.246+0000 INFO Neo4j Server shutdown initiated by request
2023-04-03 15:57:45.247+0000 INFO Stopped.
neo4j@debian10:/home/dbtech$

So, is there a bug 5.6.0 community edition?

@martti.laiho

I installed Neo4j Community Edition 5.6.0 as per Debian-based distributions (.deb) - Operations Manual and it started as is.

As the stack reports

2023-04-03 15:57:45.236+0000 ERROR Failed to start Neo4j on localhost:7474.
java.lang.RuntimeException: java.io.EOFException
at org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:61) ~[neo4j-5.6.0.jar:5.6.0]

the source code is at

any chance you have apoc installed? and or using the UUID module?

Dana, thank you very much for your prompt help!
By ".. and it worked as is" do you mean that it worked without problems?

On apoc, in the labs folder I've got apoc-5.6.0-core.jar but I have not copied it to plugins folder, so it is not installed.
On UUID module, I am not aware of this. I have tried to run this "neo4j console --verbose" both as neo4j user or dbtech user which was used for installing the community server.

Looking at the "AbstractIdentityModule" code and the "java.lang.RuntimeException: java.io.EOFException" it fails on line 46
on "storage.readState()". So, I wonder if it means that it tries to access some folder at $NEO4J_HOME/ which exists but is empty?
Looking at the "Default file locations" documentation the "Configuration" explanation for Linux is not clear to me.
This is the current status in my VM:

dbtech@debian10:~$ ls /etc/neo4j -l
total 32
-rw-r--r-- 1 neo4j adm 3946 Mar 17 11:04 neo4j-admin.conf
-rw-r--r-- 1 neo4j adm 16094 Apr 3 16:39 neo4j.conf
-rw-r--r-- 1 neo4j adm 4392 Mar 17 11:04 server-logs.xml
-rw-r--r-- 1 neo4j adm 2332 Mar 17 11:04 user-logs.xml
dbtech@debian10:~$ ls $NEO4J_HOME/conf -l
total 0
lrwxrwxrwx 1 root root 26 Mar 30 10:22 server-logs.xml -> /etc/neo4j/server-logs.xml
lrwxrwxrwx 1 root root 24 Mar 30 10:23 user-logs.xml -> /etc/neo4j/user-logs.xml
dbtech@debian10:~$

Best regards
Martti

@martti.laiho

i installed 5.6.0 Community as described in doc and found no issues.

if you uninstall / reinstall do you continue to have the same issue?

Dano, how can I uninstall Neo4j?

ke 5. huhtik. 2023 klo 16.11 Dana Canzano via Neo4j Online Community <notifications@neo4jcommunity.discoursemail.com> kirjoitti:

@martti.laiho

You installed using

sudo apt-get install neo4j=1:5.6.0

or similar correct? if so use apt-get to remoive?

Dana,

I have now removed and reinstalled neo4j multiple times, and starting the server fails in the same EOFexception in the same address.
Doesn't this indicate an empty folder or broken structure in some file?

The platform may suffer from some configuration left from 3.5.8.

Did you use Debian 10 or 11?

Br Martti

Dana,
On ERROR
java.lang.RuntimeException: java.io.EOFException at
org.neo4j.dbms.identity.AbstractIdentityModule.readOrGenerate(AbstractIdentityModule.java:61)

  • the debug.log file ends at
    [ Packaging ]

Dana, thank you for your prompt helps!
The problem solved by starting with fresh copy of the VM, and instead of using the installing files from debian distro by downloading from
https://neo4j.com/download-center/ files cypher-shell_5.6.0_all.deb and neo4j_5.6.0_all.deb, and installing them by sudo apt-get install ./

Well, there remain some config issues:
dbtech@debian10:~$ su neo4j
Password:
neo4j@debian10:/home/dbtech$ groups
neo4j
neo4j@debian10:/home/dbtech$ neo4j-admin server status
Neo4j is running at pid 7984
neo4j@debian10:/home/dbtech$

neo4j@debian10:/home/dbtech$ echo $JAVA_HOME
/usr/lib/jvm/jdk-17
neo4j@debian10:/home/dbtech$ java -version
java version "17.0.6" 2023-01-17 LTS
Java(TM) SE Runtime Environment (build 17.0.6+9-LTS-190)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.6+9-LTS-190, mixed mode, sharing)
neo4j@debian10:/home/dbtech$

neo4j@debian10:/home/dbtech$ neo4j-admin server validate-config
Validating Neo4j configuration: /etc/neo4j/neo4j.conf
No issues found.

Validating server Log4j configuration: /var/lib/neo4j/conf/user-logs.xml
Error: file does not exist at /var/lib/neo4j/conf/user-logs.xml

Validating user Log4j configuration: /var/lib/neo4j/conf/server-logs.xml
Error: file does not exist at /var/lib/neo4j/conf/server-logs.xml

Validation failed.
Configuration contains errors.
Run with '--verbose' for a more detailed error message.
neo4j@debian10:/home/dbtech$

neo4j@debian10:/home/dbtech$ ls /var/lib/neo4j -l
total 28
drwxr-xr-x 2 neo4j adm 4096 Jan 6 2019 certificates
drwxr-xr-x 6 neo4j adm 4096 Apr 10 12:17 data
drwxr-xr-x 2 neo4j adm 4096 Mar 23 15:01 import
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:12 labs
drwxr-xr-x 2 neo4j adm 4096 Mar 23 15:01 licenses
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:12 plugins
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:17 run
neo4j@debian10:/home/dbtech$
neo4j@debian10:/home/dbtech$ ls /etc/neo4j -l
total 32
-rw-r--r-- 1 neo4j adm 3946 Mar 17 11:04 neo4j-admin.conf
-rw-r--r-- 1 neo4j adm 15819 Mar 23 15:01 neo4j.conf
-rw-r--r-- 1 neo4j adm 4392 Mar 17 11:04 server-logs.xml
-rw-r--r-- 1 neo4j adm 2332 Mar 17 11:04 user-logs.xml

neo4j@debian10:~$ mkdir conf
neo4j@debian10:~$ ls -l
total 32
drwxr-xr-x 2 neo4j adm 4096 Jan 6 2019 certificates
drwxr-xr-x 2 neo4j neo4j 4096 Apr 10 17:01 conf
drwxr-xr-x 6 neo4j adm 4096 Apr 10 12:17 data
drwxr-xr-x 2 neo4j adm 4096 Mar 23 15:01 import
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:12 labs
drwxr-xr-x 2 neo4j adm 4096 Mar 23 15:01 licenses
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:12 plugins
drwxr-xr-x 2 neo4j adm 4096 Apr 10 12:17 run
neo4j@debian10:~$ cd conf
neo4j@debian10:~/conf$ ln -s /etc/neo4j/server-logs.xml server-logs.xml
neo4j@debian10:~/conf$ ln -s /etc/neo4j/user-logs.xml user-logs.xml
neo4j@debian10:~/conf$ ls -l
total 0
lrwxrwxrwx 1 neo4j neo4j 26 Apr 10 17:05 server-logs.xml -> /etc/neo4j/server-logs.xml
lrwxrwxrwx 1 neo4j neo4j 24 Apr 10 17:05 user-logs.xml -> /etc/neo4j/user-logs.xml
neo4j@debian10:~/conf$

neo4j@debian10:~/conf$ neo4j-admin server validate-config
Validating Neo4j configuration: /etc/neo4j/neo4j.conf
No issues found.

Validating server Log4j configuration: /var/lib/neo4j/conf/user-logs.xml
No issues found.

Validating user Log4j configuration: /var/lib/neo4j/conf/server-logs.xml
No issues found.

Validation successful.
neo4j@debian10:~/conf$

Also trying to use Neo4j Browser, it just gets freezed at localhost:7474/browser/ and nothing happens

Dana, installing the deb files from https://neo4j.com/download-center/ succeeded as I reported Online Community pages,
but Neo4j Browser gets freezed as follows

Can you advice?

Br Martti