docker-neo4j icon indicating copy to clipboard operation
docker-neo4j copied to clipboard

Neo4j docker images broken for version 4

Open apricotssssssman opened this issue 4 years ago • 7 comments

I'm using the images on: https://hub.docker.com/_/neo4j?tab=tags

It seems the images for version 4 are all broken. I get this error when I build and run the container. Trying to create a Neo4j v4 database via the Neo4j desktop browser also fails.

Starting Neo4j.
2020-03-05 22:47:18.567+0000 INFO  ======== Neo4j 4.0.1 ========
2020-03-05 22:47:18.602+0000 INFO  Starting...
2020-03-05 22:47:34.712+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@3757e8e2' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.graphdb.event.TransactionEventHandler". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@3757e8e2' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.graphdb.event.TransactionEventHandler".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@3757e8e2' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.graphdb.event.TransactionEventHandler".
	at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:164)
	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: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@3757e8e2' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.graphdb.event.TransactionEventHandler".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:157)
	... 3 more
Caused by: java.lang.RuntimeException: Error starting database server at /data/databases
	at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:167)
	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)
	... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.procedure.impl.GlobalProceduresRegistry@27a97e08' was successfully initialized, but failed to start. Please see the attached cause exception "org.neo4j.graphdb.event.TransactionEventHandler".
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:465)
	at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
	at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:158)
	... 9 more
Caused by: org.neo4j.internal.kernel.api.exceptions.ProcedureException: Failed to compile procedure defined in `Trigger`: org/neo4j/graphdb/event/TransactionEventHandler
	at org.neo4j.procedure.impl.ProcedureCompilation.compileProcedure(ProcedureCompilation.java:384)
	at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:283)
	at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:225)
	at org.neo4j.procedure.impl.ProcedureJarLoader.loadProcedures(ProcedureJarLoader.java:114)
	at org.neo4j.procedure.impl.ProcedureJarLoader.loadProceduresFromDir(ProcedureJarLoader.java:85)
	at org.neo4j.procedure.impl.GlobalProceduresRegistry.start(GlobalProceduresRegistry.java:342)
	at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
	... 11 more
Caused by: java.lang.NoClassDefFoundError: org/neo4j/graphdb/event/TransactionEventHandler
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.getDeclaringClass0(Native Method)
	at java.base/java.lang.Class.isTopLevelClass(Class.java:1693)
	at java.base/java.lang.Class.getSimpleBinaryName(Class.java:1678)
	at java.base/java.lang.Class.getSimpleName0(Class.java:1562)
	at java.base/java.lang.Class.getSimpleName(Class.java:1553)
	at org.neo4j.procedure.impl.ProcedureCompilation.iteratorName(ProcedureCompilation.java:725)
	at org.neo4j.procedure.impl.ProcedureCompilation.generateIterator(ProcedureCompilation.java:615)
	at org.neo4j.procedure.impl.ProcedureCompilation.compileProcedure(ProcedureCompilation.java:347)
	... 17 more
Caused by: java.lang.ClassNotFoundException: org.neo4j.graphdb.event.TransactionEventHandler
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 34 more
2020-03-05 22:47:34.714+0000 INFO  Neo4j Server shutdown initiated by request

apricotssssssman avatar Mar 06 '20 17:03 apricotssssssman

What did you do to produce the error? If I run docker run --rm neo4j:4.0.1 the neo4j 4.0.1 starts up as expected.

jennyowen avatar Mar 09 '20 11:03 jennyowen

What did you do to produce the error? If I run docker run --rm neo4j:4.0.1 the neo4j 4.0.1 starts up as expected.

Think I'm getting something similar. It works if I run that command, but if I use a docker-compose, then it breaks. The docker-compose works for images 3.5.14 however

version: '3.5'

services:
    database:
        container_name: n4j-database
        image: neo4j:latest
        ports:
            - "7474:7474"
            - "7687:7687"
        networks:
            - backend

    ... # other services
networks:
    backend:

silverinkbottl3 avatar Mar 09 '20 16:03 silverinkbottl3

@silverinkbottl3 thanks for the more detailed information! I tried running docker-compose up on your config, with neo4j:latest, 4.0.0, 3.5.15 and 3.5.14 and they all worked as expected.

The error message suggests that there's neo4j libraries missing from the classpath, which is odd in a docker environment. Especially if the same image works on your machine without docker-compose. Could you try:

  • clearing your cache of docker images, especially the neo4j ones.
  • making sure your computer has enough free hard drive space to store the images
  • running one neo4j service on its own, so there are no concurrent services.

jennyowen avatar Mar 10 '20 10:03 jennyowen

Hi :)

We were getting this exact error when I tried updating from neo4j 3.5 to 4.0.1. It turned out to be that we were still using the 3.5 version of apoc and deleting that (or updating it) allowed neo4j to start.

Hope that helps, and let me know if you need any more information from me.

catchouli avatar Mar 14 '20 04:03 catchouli

Had a similar issue, and it was my first time running Neo4J on that particular machine. Removed old images with docker system prune -a and ran the docker run --rm neo4j:4.0.1 again, it works now.

danieljue avatar Mar 24 '20 21:03 danieljue

Hi :)

We were getting this exact error when I tried updating from neo4j 3.5 to 4.0.1. It turned out to be that we were still using the 3.5 version of apoc and deleting that (or updating it) allowed neo4j to start.

Hope that helps, and let me know if you need any more information from me.

thanks @catchouli , lifesaver!

ewengillies avatar Jun 22 '20 16:06 ewengillies

Basically breaks on a regular basis. Quite annoying

adadgio avatar Oct 24 '22 10:10 adadgio