Neo4j cluster not starting - neo4j

I am building a Neo4j HA cluster and have followed the steps at https://neo4j.com/docs/operations-manual/current/tutorial/highly-available-cluster/
I have 3 machines running Neo4j in a single-instance Docker container.
Neo4j works fine as a standalone server on each machine, but when I add the HA config, it fails to start.
Each machine was created from the same prebuilt image so they are configured identically except for the ha.server_id which is unique for each machine (values are 1, 2, 3).
Firewall is off and I've verified connectivity between the machines.
The Neo4j HA config is:
ha.server_id=1
ha.initial_hosts=172.0.30.110:5001,172.0.31.39:5001,172.0.32.249:5001
dbms.mode=HA
To start Neo4j I'm running the following on each machine:
/usr/bin/docker run \
--publish=7474:7474 --publish=7687:7687 --publish=5001:5001 \
--volume=/var/lib/neo4j/data:/data \
--volume=/var/lib/neo4j/logs:/logs \
--volume=/var/lib/neo4j/conf:/conf \
--name=neo4j \
neo4j:3.0-enterprise
When I run the startup command on machines 2 and 3, and sometimes on machine 1, I get an error following 'Attempting to join cluster'. Occasionally (but not all the time) when I run the command on machine 1, it realizes it is the first machine and goes ahead to initialize itself as master.
Below are the full failure and success messages. I can't figure out why only one machine (incidentally the first) is doing what it's supposed to do sometimes and not all the time. I also need to figure out how to get the other two machines to register themselves with the cluster.
Why is one node sometimes launching Neo4j with clustering and sometimes not?
Why are the 2nd and 3rd nodes not registering with the cluster?
Where should I look next?
Error (seen on all 3 machines):
> 2017-05-30 09:18:35.502+0000 INFO Starting... 2017-05-30
> 09:18:35.833+0000 INFO Write transactions to database disabled
> 2017-05-30 09:18:36.116+0000 INFO Bolt enabled on 0.0.0.0:7687.
> 2017-05-30 09:18:36.131+0000 INFO Initiating metrics... 2017-05-30
> 09:18:36.937+0000 INFO Attempting to join cluster of
> [172.0.30.110:5001, 172.0.31.39:5001, 172.0.32.249:5001] 2017-05-30
> 09:19:06.996+0000 ERROR Failed to start Neo4j: Starting Neo4j failed:
> Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#626a4cfa' was
> successfully initialized, but failed to start. Please see attached
> cause exception. Starting Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#626a4cfa' was
> successfully initialized, but failed to start. Please see attached
> cause exception. org.neo4j.server.ServerStartupException: Starting
> Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#626a4cfa' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
> at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:215)
> at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
> at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
> at org.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:32)
> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#626a4cfa' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
> ... 3 more Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.ha.factory.HighlyAvailableFacadeFactory,
> /var/lib/neo4j/data/databases/fraud.db
> at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
> at org.neo4j.kernel.ha.factory.HighlyAvailableFacadeFactory.newFacade(HighlyAvailableFacadeFactory.java:42)
> at org.neo4j.kernel.ha.HighlyAvailableGraphDatabase.<init>(HighlyAvailableGraphDatabase.java:41)
> at org.neo4j.server.enterprise.EnterpriseNeoServer.lambda$static$0(EnterpriseNeoServer.java:80)
> at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> ... 5 more Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.cluster.client.ClusterJoin#5d2e6054' was successfully
> initialized, but failed to start. Please see attached cause exception.
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
> ... 10 more Caused by: java.util.concurrent.TimeoutException: Conversation-response mapping:
> {3/13#=ResponseFuture{conversationId='3/13#',
> initiatedByMessageType=join, response=null}}
> at org.neo4j.cluster.statemachine.StateMachineProxyFactory$ResponseFuture.get(StateMachineProxyFactory.java:314)
> at org.neo4j.cluster.client.ClusterJoin.joinByConfig(ClusterJoin.java:143)
> at org.neo4j.cluster.client.ClusterJoin.start(ClusterJoin.java:82)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> ... 14 more ubuntu#ip-172-0-32-249:~$ sudo /usr/bin/docker rm neo4j neo4j ubuntu#ip-172-0-32-249:~$ sudo /usr/bin/docker run
> --publish=7474:7474 --publish=7687:7687 --publish=5001:5001 --volume=/var/lib/neo4j/data:/data --volume=/var/lib/neo4j/logs:/logs --volume=/var/lib/neo4j/conf:/conf --name=neo4j neo4j:3.0-enterprise Starting Neo4j. 2017-05-30 09:20:17.877+0000 INFO No SSL certificate
> found, generating a self-signed certificate.. 2017-05-30
> 09:20:18.387+0000 INFO Starting... 2017-05-30 09:20:18.676+0000 INFO
> Write transactions to database disabled 2017-05-30 09:20:19.036+0000
> INFO Bolt enabled on 0.0.0.0:7687. 2017-05-30 09:20:19.046+0000 INFO
> Initiating metrics... 2017-05-30 09:20:19.779+0000 INFO Attempting to
> join cluster of [172.0.30.110:5001, 172.0.31.39:5001,
> 172.0.32.249:5001] 2017-05-30 09:20:49.851+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#1b826a22' was
> successfully initialized, but failed to start. Please see attached
> cause exception. Starting Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#1b826a22' was
> successfully initialized, but failed to start. Please see attached
> cause exception. org.neo4j.server.ServerStartupException: Starting
> Neo4j failed: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#1b826a22' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
> at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:215)
> at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90)
> at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67)
> at org.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:32)
> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.server.database.LifecycleManagingDatabase#1b826a22' was
> successfully initialized, but failed to start. Please see attached
> cause exception.
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:187)
> ... 3 more Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.ha.factory.HighlyAvailableFacadeFactory,
> /var/lib/neo4j/data/databases/fraud.db
> at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
> at org.neo4j.kernel.ha.factory.HighlyAvailableFacadeFactory.newFacade(HighlyAvailableFacadeFactory.java:42)
> at org.neo4j.kernel.ha.HighlyAvailableGraphDatabase.<init>(HighlyAvailableGraphDatabase.java:41)
> at org.neo4j.server.enterprise.EnterpriseNeoServer.lambda$static$0(EnterpriseNeoServer.java:80)
> at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> ... 5 more Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.cluster.client.ClusterJoin#6c1c89e2' was successfully
> initialized, but failed to start. Please see attached cause exception.
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
> at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
> ... 10 more Caused by: java.util.concurrent.TimeoutException: Conversation-response mapping:
> {3/13#=ResponseFuture{conversationId='3/13#',
> initiatedByMessageType=join, response=null}}
> at org.neo4j.cluster.statemachine.StateMachineProxyFactory$ResponseFuture.get(StateMachineProxyFactory.java:314)
> at org.neo4j.cluster.client.ClusterJoin.joinByConfig(ClusterJoin.java:143)
> at org.neo4j.cluster.client.ClusterJoin.start(ClusterJoin.java:82)
> at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
> ... 14 more
Success (seen on one machine only):
2017-05-30 09:20:22.963+0000 INFO Starting...
2017-05-30 09:20:23.319+0000 INFO Write transactions to database disabled
2017-05-30 09:20:23.619+0000 INFO Bolt enabled on 0.0.0.0:7687.
2017-05-30 09:20:23.628+0000 INFO Initiating metrics...
2017-05-30 09:20:24.352+0000 INFO Attempting to join cluster of [172.0.30.110:5001, 172.0.31.39:5001, 172.0.32.249:5001]
2017-05-30 09:20:31.382+0000 INFO Could not join cluster of [172.0.30.110:5001,172.0.31.39:5001, 172.0.32.249:5001]
2017-05-30 09:20:31.382+0000 INFO Creating new cluster with name [neo4j.ha]...
2017-05-30 09:20:31.396+0000 INFO Instance 1 (this server) entered the cluster
2017-05-30 09:20:31.401+0000 INFO Instance 1 (this server) was elected as coordinator
2017-05-30 09:20:31.413+0000 INFO I am 1, moving to master
2017-05-30 09:20:31.465+0000 INFO Instance 1 (this server) was elected as coordinator
2017-05-30 09:20:31.492+0000 INFO I am 1, successfully moved to master
2017-05-30 09:20:31.510+0000 INFO Instance 1 (this server) is available as master at ha://172.17.0.2:6001?serverId=1 with StoreId{creationTime=1496122128110,randomId=-2708986986476371425, storeVersion=15531981201765894, upgradeTime=1496122128110, upgradeId=1}
2017-05-30 09:20:31.612+0000 INFO Instance 1 (this server) is available as backup at backup://127.0.0.1:6362 with StoreId{creationTime=1496122128110, randomId=-2708986986476371425, storeVersion=15531981201765894, upgradeTime=1496122128110, upgradeId=1}
2017-05-30 09:20:31.709+0000 INFO Database available for write transactions
2017-05-30 09:20:32.929+0000 INFO Started.
2017-05-30 09:20:33.087+0000 INFO Mounted REST API at: /db/manage
2017-05-30 09:20:33.828+0000 INFO Remote interface available at http://0.0.0.0:7474/

Related

Neo4j service not starting

I have been using Neo4j for more than 3 months on this server. Not sure what changed, but today morning I am unable to start Neo4j server.
Till today everything was fine and there were not changes that I know of were made to Neo4j or anything else.
I am currently using neo4j 3.1.0.
The following is the error log.
xxx#dataserver:~$ sudo neo4j console
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
2017-05-01 03:09:17.948+0000 INFO Starting...
2017-05-01 03:09:18.616+0000 INFO Bolt enabled on 0.0.0.0:7687.
2017-05-01 03:09:20.766+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#2241b683' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#2241b683' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#2241b683' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:227)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:68)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#2241b683' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:199)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /var/lib/neo4j/data/databases/default.graphdb
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:193)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:124)
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:57)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.recovery.Recovery#4b1ec7fa' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:415)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:98)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:517)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:100)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:189)
... 9 more
Caused by: java.lang.IllegalArgumentException: Unknown entry type -1 for version -1. At position LogPosition{logVersion=94, byteOffset=157773910} and entry version V2_1
at org.neo4j.kernel.impl.transaction.log.entry.LogEntryVersion.entryParser(LogEntryVersion.java:141)
at org.neo4j.kernel.impl.transaction.log.entry.VersionAwareLogEntryReader.readLogEntry(VersionAwareLogEntryReader.java:84)
at org.neo4j.kernel.impl.transaction.log.LogEntryCursor.next(LogEntryCursor.java:54)
at org.neo4j.kernel.recovery.LatestCheckPointFinder.find(LatestCheckPointFinder.java:78)
at org.neo4j.kernel.recovery.PositionToRecoverFrom.apply(PositionToRecoverFrom.java:53)
at org.neo4j.kernel.recovery.DefaultRecoverySPI.getPositionToRecoverFrom(DefaultRecoverySPI.java:80)
at org.neo4j.kernel.recovery.Recovery.init(Recovery.java:80)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:405)
... 18 more
Stop service
Change dbms.allow_upgrade to true in neo4j config file
Start service again
I had the same problem, and upgrading the db fixed it. I would also suggest changing the password if you are still using default password. Once you start the service it should upgrade the database, once upgraded, you can change the dbms.allow_upgrade to false again if you dont want neo4j to update automatically.

Neo4j Causal Clustering, cannot form cluster with existing database

Following the documentation we can set up a cluster with an empty DB.
However, following the instructions to set up a cluster with an existing DB we are met with failure, after 10 minutes all three cores throw an exception.
This could be due to: causal_clustering.join_catch_up_timeout=10m
However the databases are already in sync, so "start up should be instantaneous"
Any information pointing us in the right direction would be appreciated.
Exception:
2017-01-27 16:28:56.128+0000 INFO Starting...
2017-01-27 16:28:56.787+0000 INFO Bolt enabled on 192.168.252.231:7687.
2017-01-27 16:28:56.794+0000 INFO Initiating metrics...
2017-01-27 16:28:56.885+0000 INFO Waiting for other members to join cluster before continuing...
2017-01-27 17:00:28.225+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#1db1d0b8' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#1db1d0b8' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#1db1d0b8' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:227)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:91)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:68)
at org.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#1db1d0b8' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:199)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory, /var/lib/neo4j/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:193)
at org.neo4j.causalclustering.core.CoreGraphDatabase.<init>(CoreGraphDatabase.java:56)
at org.neo4j.causalclustering.core.CoreGraphDatabase.<init>(CoreGraphDatabase.java:47)
at org.neo4j.server.enterprise.EnterpriseNeoServer.lambda$static$2(EnterpriseNeoServer.java:95)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.causalclustering.core.state.CoreState#278df960' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:443)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.initFacade(GraphDatabaseFacadeFactory.java:189)
... 10 more
Caused by: java.lang.RuntimeException: This machine failed to get the start state in time.
at org.neo4j.causalclustering.core.state.CoreState.start(CoreState.java:176)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:433)
... 12 more
Please check if the following configurations are in order for your cluster.
1) neo4j.conf
"dbms.connectors.default_advertised_address" for each causal cluster is configured correctly and these IP addresses are reachable to each other.
also, set "dbms.connectors.default_listen_address" to 0.0.0.0
2) unbind the nodes and restart them.
Let me know if you still see the issue.

neo4j drwho dataset upgrade to 3.0 not working

I am trying to use the "Jim Webber’s Doctor Who Data Set" from http://neo4j.com/developer/example-data/ in my Mac OSX with Neo4j 3.0.1-community.
I am following these steps (doc is here):
download the zip data file into the import directory (for convenience), and rename it as graph.db.
set dbms.allow_format_migration=true in $NEO4J_HOME/conf/neo4j.conf
Import data using $NEO4J_HOME/bin/neo4j-admin import --mode=database --database=graph.db --from=$NEO4J_HOME/import/graph.db/
start neo4j server
The neo4j console doesn't start, with this error message:
bin/neo4j console
Starting Neo4j.
2016-06-15 09:24:11.371+0000 INFO Starting...
2016-06-15 09:24:12.084+0000 INFO Bolt enabled on localhost:7687.
2016-06-15 09:24:12.296+0000 INFO Starting upgrade of database
2016-06-15 09:24:12.315+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:81)
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:60)
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#51f07bf0' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /Users/miro/Documents/dev/neo4j/neo4j-community-3.0.1/data/databases/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.server.CommunityNeoServer.lambda$static$32(CommunityNeoServer.java:55)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.NeoStoreDataSource#7b464635' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:99)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
... 10 more
Caused by: org.neo4j.kernel.impl.storemigration.StoreUpgrader$UnexpectedUpgradingStoreVersionException: '/Users/miro/Documents/dev/neo4j/neo4j-community-3.0.1/data/databases/graph.db/neostore' has a store version 'v0.A.0' that we cannot upgrade from.
at org.neo4j.kernel.impl.storemigration.UpgradableDatabase.checkUpgradeable(UpgradableDatabase.java:122)
at org.neo4j.kernel.impl.storemigration.StoreUpgrader.migrateIfNeeded(StoreUpgrader.java:129)
at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:98)
at org.neo4j.kernel.NeoStoreDataSource.upgradeStore(NeoStoreDataSource.java:554)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:433)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
... 15 more
Does anyeone know how to fix it? Has anyone managed to use the datasets in the doc?
Thank you!
Neo4j 3.0 allows direct upgrades from any cleanly shutdown Neo4j 2.x dataset. However the DrWho dataset you're referring to is from old days of Neo4j 1.9 (or even earlier). Due to this you need a two step upgrade process:
download Neo4j 2.3.3 (or any new 2.x release)
unpack the drwho.zip into data/graph.db
set allow_store_upgrade=true in conf/neo4j.properties
start the database and stop it gracefully
unpack neo4j 3.0.x
copy the data/graph.db from Neo4j 2.x to data/databases/graph.db
set dbms.allow_format_migration=true in conf/neo4j.conf
start up Neo4j 3.0.x

Docker container with Neo4j 2.3 enterprise edition exits without error message when mounting graph.db volume

I have a snapshot of a graph.db that is over 40 gb in size. That snapshot came from a server running Neo4j 2.2.8. Now I'm trying to run this database locally to explore the existing graph without wasting resources and potentially crashing the server.
To do so, I'm using Neo4j via Docker and mounting that snapshot. At least that's what I'm trying to do via docker run -p 7474:7474 --ulimit=nofile=40000:40000 --env=NEO4J_CACHE_MEMORY=8G --env=NEO4J_ALLOW_STORE_UPGRADE=true --env=NEO4J_AUTH=none --volume=$HOME/graph.db:/data/graph.db neo4j:enterprise
This docker image uses the enterprise edition of Neo4j 2.3.2 and therefore needs to set allow_store_upgrade to true.
The only output I'm getting is this:
Starting Neo4j Server console-mode...
2016-03-02 22:43:44.277+0000 INFO No SSL certificate found, generating a self-signed certificate..
2016-03-02 22:43:45.718+0000 INFO Initiating metrics..
Then the container stops and I get control back of the command line.
docker ps -l shows that the container exits with status code 137.
My question here is: How can I troubleshoot this (non-)error and run this dataset on my local machine in a safe environment?
Now when I start Neo4j 2.3.2 community edition on localhost with $HOME/graph.db as the database path, the store gets updated and after a short while, Neo4j is accessible.
With the upgraded store in place, I stopped Neo4j on localhost and tried to re-run docker on the upgraded database.
This is the (logged) output:
Starting Neo4j Server console-mode...
2016-03-07 17:14:17.835+0000 INFO No SSL certificate found, generating a self-signed certificate..
2016-03-07 17:14:19.214+0000 INFO Initiating metrics..
2016-03-07 17:15:05.068+0000 INFO Successfully shutdown Neo4j Server
2016-03-07 17:15:05.070+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#13ae26d2' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#13ae26d2' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#13ae26d2' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:67)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:97)
at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48)
at org.neo4j.server.enterprise.EnterpriseBootstrapper.main(EnterpriseBootstrapper.java:32)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase#13ae26d2' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:462)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:194)
... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.enterprise.EnterpriseFacadeFactory, /var/lib/neo4j/data/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)
at org.neo4j.kernel.impl.enterprise.EnterpriseFacadeFactory.newFacade(EnterpriseFacadeFactory.java:40)
at org.neo4j.graphdb.EnterpriseGraphDatabase.<init>(EnterpriseGraphDatabase.java:57)
at org.neo4j.server.enterprise.EnterpriseNeoServer$2.newGraphDatabase(EnterpriseNeoServer.java:67)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.api.index.IndexingService#7d237704' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:434)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:600)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
... 10 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:3664)
at java.lang.String.<init>(String.java:207)
at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122)
at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:184)
at org.apache.lucene.index.TermInfosReaderIndex.<init>(TermInfosReaderIndex.java:77)
at org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:116)
at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:83)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:116)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:94)
at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:105)
at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:78)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:709)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:72)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:256)
at org.neo4j.kernel.api.impl.index.LuceneIndexWriter.isOnline(LuceneIndexWriter.java:74)
at org.neo4j.kernel.api.impl.index.LuceneSchemaIndexProvider.getInitialState(LuceneSchemaIndexProvider.java:119)
at org.neo4j.kernel.impl.api.index.IndexingService.init(IndexingService.java:225)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:424)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:66)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:102)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:600)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
at org.neo4j.kernel.impl.enterprise.EnterpriseFacadeFactory.newFacade(EnterpriseFacadeFactory.java:40)
at org.neo4j.graphdb.EnterpriseGraphDatabase.<init>(EnterpriseGraphDatabase.java:57)
at org.neo4j.server.enterprise.EnterpriseNeoServer$2.newGraphDatabase(EnterpriseNeoServer.java:67)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95)

Neo4j - failed to start after upgrading from 2.2.5 to 2.3.0

This is the error I am getting.
The database is empty, no graph.db directory.
All server properties files are the same with those used for version 2.2.5.
Here is the content of console.log :
15:56:31.972 [main] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
2015-10-26 15:56:33.932+0000 INFO Successfully shutdown Neo4j Server
2015-10-26 15:56:33.934+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.d
atabase.LifecycleManagingDatabase#36a005fb' was successfully initialized, but failed to start. Please see atta
ched cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase#36
a005fb' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.Lifecycle
ManagingDatabase#36a005fb' was successfully initialized, but failed to start. Please see attached cause except
ion.
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.ja
va:67)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:234)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:100)
at org.neo4j.server.CommunityBootstrapper.start(CommunityBootstrapper.java:48)
at org.neo4j.server.CommunityBootstrapper.main(CommunityBootstrapper.java:35)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagi
ngDatabase#36a005fb' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:538)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:109)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:194)
... 3 more
Suppressed: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFa
ctory, /var/lib/neo4j/data/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFacto
ry.java:143)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:
43)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFacto
ry.java:108)
at org.neo4j.server.CommunityNeoServer$1.newGraphDatabase(CommunityNeoServer.java:66)
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:95
)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:528)
... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.recovery.Recover
y#2591d7e3' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:510)
What is wrong here?
Looks like it was something mach simpler. I had to change the parameter org.neo4j.server.database.location=/home/ubuntu/data/neo4j-data/graph.db since the default location provided by the installer was wrong.

Resources