Hi,
We want to use docker to run neo4j 4.1.1 and have SSL enabled. However, neo4j will not run with these settings. The specific error we get is:
ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /data/databases
The following command is used to spin up the docker container (the image comes from docker hub):
#!/bin/bash
groups=( $( id --real --groups neo4j ) )
docker run \
--interactive \
--detach \
--name=neo4j411 \
--publish=7687:7687 \
--publish=7473:7473 \
--publish=7474:7474 \
--volume=/appl/neo4j/conf:/conf \
--volume=/appl/neo4j/plugins:/plugins \
--volume=/appl/neo4j/logs:/logs \
--volume=/appl/neo4j/data:/data \
--volume=/appl/mnt/:/import \
--volume=/appl/neo4j/export:/export \
--volume=/appl/neo4j/ssl:/ssl \
--user="$(id -u neo4j):$(id -g neo4j)" \
--group-add=$groups \
--env TZ='Europe/Amsterdam' \
--env NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.* \
--env NEO4J_dbms_security_procedures_whitelist=gds.*,apoc.* \
--env NEO4J_dbms_memory_heap_initial__size=31G \
--env NEO4J_dbms_memory_heap_max__size=31G \
--env NEO4J_dbms_memory_pagecache_size=135G \
--env NEO4J_dbms_ssl_policy_bolt_enabled=true \
--env NEO4J_dbms_ssl_policy_bolt_base__directory=/ssl/bolt \
--env NEO4J_dbms_ssl_policy_bolt_private__key=private.key \
--env NEO4J_dbms_ssl_policy_bolt_public__certificate=certificate.csr \
--env NEO4J_dbms_ssl_policy_bolt_client__auth=NONE \
--env NEO4J_dbms_ssl_policy_https_enabled=true \
--env NEO4J_dbms_ssl_policy_https_base__directory=/ssl/https \
--env NEO4J_dbms_ssl_policy_https_private__key=private.key \
--env NEO4J_dbms_ssl_policy_https_public__certificate=certificate.csr \
--env NEO4J_dbms_ssl_policy_https_client__auth=NONE \
--env NEO4J_dbms_connector_http_enabled=true \
--env NEO4J_dbms_connector_https_enabled=true \
--env NEO4J_dbms_connector_bolt_tls__level=REQUIRED \
neo4j:latest /bin/bash
Which results in the following log entries in neo4j.log:
2020-11-27 14:13:19.274+0000 INFO Starting...
2020-11-27 14:13:21.817+0000 INFO ======== Neo4j 4.1.1 ========
2020-11-27 14:13:31.478+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.procedure.impl.GlobalProceduresRegistry@536d97f8' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to set up injection for procedure `GraphGenerateProc`, the field `tracker` has type `interface org.neo4j.graphalgo.core.utils.mem.AllocationTracker` which is not a known injectable component.".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
... 5 more
Caused by: org.neo4j.kernel.api.exceptions.ComponentInjectionException: Unable to set up injection for procedure `GraphGenerateProc`, the field `tracker` has type `interface org.neo4j.graphalgo.core.utils.mem.AllocationTracker` which is not a known injectable component.
at org.neo4j.procedure.impl.FieldInjections.createInjector(FieldInjections.java:98)
at org.neo4j.procedure.impl.FieldInjections.setters(FieldInjections.java:81)
at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:264)
at org.neo4j.procedure.impl.ProcedureCompiler.compileProcedure(ProcedureCompiler.java:226)
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:442)
... 7 more
2020-11-27 14:13:31.479+0000 INFO Neo4j Server shutdown initiated by request
Without SSL, using the following docker command, we are able to get everything up and running:
docker run \
--interactive \
--detach \
--name=neo4j411 \
--publish=7687:7687 \
--publish=7473:7473 \
--publish=7474:7474 \
--volume=/appl/neo4j/conf:/conf \
--volume=/appl/neo4j/plugins:/plugins \
--volume=/appl/neo4j/logs:/logs \
--volume=/appl/neo4j/data:/data \
--volume=/appl/mnt/:/import \
--volume=/appl/neo4j/export:/export \
--volume=/appl/neo4j/ssl:/ssl \
--user="$(id -u neo4j):$(id -g neo4j)" \
--group-add=$groups \
--env TZ='Europe/Amsterdam' \
--env NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.* \
--env NEO4J_dbms_security_procedures_whitelist=gds.*,apoc.* \
--env NEO4J_dbms_memory_heap_initial__size=31G \
--env NEO4J_dbms_memory_heap_max__size=31G \
--env NEO4J_dbms_memory_pagecache_size=135G \
neo4j:latest /bin/bash
Your help is much appreciated. Thanks!