cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

ERROR Failed to start Neo4j: Starting Neo4j failed

VINNUSAURUS
Node Clone

Was following neo4j tutorials to run core servers on a docker container, everything works fine until I get the following error when running the command docker start -a core1

error:

Starting Neo4j.
2019-10-13 17:24:14.009+0000 WARN  ha.host.data is deprecated.
2019-10-13 17:24:14.011+0000 WARN  ha.pull_interval is deprecated.
2019-10-13 17:24:14.012+0000 WARN  dbms.active_database is deprecated.
2019-10-13 17:24:14.033+0000 INFO  ======== Neo4j 3.5.11 ========
2019-10-13 17:24:14.040+0000 INFO  Starting...
2019-10-13 17:24:14.313+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@316bcf94' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@316bcf94' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@316bcf94' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.".
    at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:45)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:124)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
    at com.neo4j.server.enterprise.CommercialEntryPoint.main(CommercialEntryPoint.java:22)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@316bcf94' was successfully initialized, but failed to start. Please see the attached cause exception "Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.".
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:473)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:180)
    ... 3 more
Caused by: java.lang.RuntimeException: org.neo4j.causalclustering.core.state.ClusterStateException: java.io.IOException: Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.
    at org.neo4j.causalclustering.core.EnterpriseCoreEditionModule.<init>(EnterpriseCoreEditionModule.java:211)
    at com.neo4j.causalclustering.core.CommercialCoreEditionModule.<init>(CommercialCoreEditionModule.java:53)
    at com.neo4j.causalclustering.core.CommercialCoreGraphDatabase.lambda$new$0(CommercialCoreGraphDatabase.java:27)
    at org.neo4j.graphdb.facade.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:181)
    at com.neo4j.causalclustering.core.CommercialCoreGraphDatabase.<init>(CommercialCoreGraphDatabase.java:28)
    at com.neo4j.server.database.CommercialGraphFactory.newGraphDatabase(CommercialGraphFactory.java:36)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:90)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
    ... 5 more
Caused by: org.neo4j.causalclustering.core.state.ClusterStateException: java.io.IOException: Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.
    at org.neo4j.causalclustering.core.state.ClusterStateDirectory.ensureDirectoryExists(ClusterStateDirectory.java:121)
    at org.neo4j.causalclustering.core.state.ClusterStateDirectory.initialize(ClusterStateDirectory.java:60)
    at org.neo4j.causalclustering.core.EnterpriseCoreEditionModule.<init>(EnterpriseCoreEditionModule.java:207)
    ... 12 more
Caused by: java.io.IOException: Unable to create directory path [/var/lib/neo4j/data/cluster-state] for Neo4j store.
    at org.neo4j.io.fs.DefaultFileSystemAbstraction.mkdirs(DefaultFileSystemAbstraction.java:120)
    at org.neo4j.causalclustering.core.state.ClusterStateDirectory.ensureDirectoryExists(ClusterStateDirectory.java:117)
3 REPLIES 3

what is the full setup for that container? Plz show all options you've set.

This training does not support 3.5.11. The results of using the training on a release that is later than the one used the training may produce errors.

Elaine

VINNUSAURUS
Node Clone

hi, it now works i ran the below .sh file

# create the cluster network that will enable containers to communicate with each other

docker network create training-cluster

# create the container instances

# docker run --name=core1 \
#         --volume=`pwd`/core1/conf:/conf --volume=`pwd`/core1/data:/data --volume=`pwd`/core1/logs:/logs  \
#         --publish=11474:7474 --publish=11687:7687 \
#         --env=NEO4J_dbms_connector_bolt_advertised__address=localhost:11687 \
# 	--network=training-cluster \
#         --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes  \
#         --env=NEO4J_causal__clustering_minimum__core__cluster__size__at__formation=3 \
#         --env=NEO4J_causal__clustering_minimum__core__cluster__size__at__runtime=3 \
#         --env=NEO4J_causal__clustering_initial__discovery__members=core1:5000,core2:5000,core3:5000,core4:5000,core5:5000 \
#         --env=NEO4J_dbms_mode=CORE \
#         --detach \
#         $1

docker run --name=core2 \
        --volume=`pwd`/core2/conf:/conf --volume=`pwd`/core2/data:/data --volume=`pwd`/core2/logs:/logs  \
        --publish=12474:7474 --publish=12687:7687 \
	--env=NEO4J_dbms_connector_bolt_advertised__address=localhost:12687 \
        --network=training-cluster \
        --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
        --env=NEO4J_causal__clustering_minimum__core__cluster__size__at__formation=3 \
        --env=NEO4J_causal__clustering_minimum__core__cluster__size__at__runtime=3 \
        --env=NEO4J_causal__clustering_initial__discovery__members=core1:5000,core2:5000,core3:5000,core4:5000,core5:5000 \
        --env=NEO4J_dbms_mode=CORE \
        --detach \
        $1

docker run --name=core3 \
        --volume=`pwd`/core3/conf:/conf --volume=`pwd`/core3/data:/data --volume=`pwd`/core3/logs:/logs  \
        --publish=13474:7474 --publish=13687:7687 \
	--env=NEO4J_dbms_connector_bolt_advertised__address=localhost:13687 \
        --network=training-cluster \
        --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes  \
	--env=NEO4J_causal__clustering_minimum__core__cluster__size__at__formation=3 \
        --env=NEO4J_causal__clustering_minimum__core__cluster__size__at__runtime=3 \
        --env=NEO4J_causal__clustering_initial__discovery__members=core1:5000,core2:5000,core3:5000,core4:5000,core5:5000 \
        --env=NEO4J_dbms_mode=CORE \
	--detach \
        $1

# stop the containers

docker stop core1 core2 core3

the problem was starting core1 using the command start -a core1 gave that error ,so i commented all the docker run --name=core1 \ code and started core2 and core3 along with core4 which is in another script, now it works fine, the problem was with starting core1 and version 3.5.11 works fine, the problem was on version 3.5.0 too so i switched to the new version.