Neo4J server exception - fails to start - neo4j

The server had been running fine and dandy but suddenly stopped. Tried restarting but that didn't help. This is what the log says:
2015-02-18 15:07:58.092+0000 INFO [o.n.k.i.DiagnosticsManager]: --- SHUTDOWN diagnostics END ---
2015-02-18 15:07:58.336+0000 ERROR [o.n.s.CommunityBootstrapper]: Failed to start Neo Server on port [7474]
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /var/lib/neo4j-community-2.1.4/data/graph.db
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:226) ~[neo4j-server-2.1.4.jar:2.1.4]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:108) [neo4j-server-2.1.4.jar:2.1.4]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:62) [neo4j-server-2.1.4.jar:2.1.4]
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /var/lib/neo4j-community-2.1.4/data/graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:366) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:123) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:65) ~[neo4j-server-2.1.4.jar:2.1.4]
at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:71) ~[neo4j-server-2.1.4.jar:2.1.4]
at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:362) ~[neo4j-server-2.1.4.jar:2.1.4]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:159) ~[neo4j-server-2.1.4.jar:2.1.4]
... 2 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter#7bd760a1' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:343) ~[neo4j-kernel-2.1.4.jar:2.1.4]
... 8 common frames omitted
Caused by: org.neo4j.kernel.StoreLockException: Unable to obtain lock on store lock file: /var/lib/neo4j-community-2.1.4/data/graph.db/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:82) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:44) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.1.4.jar:2.1.4]
... 10 common frames omitted
Caused by: java.io.IOException: Unable to lock org.neo4j.kernel.impl.nioneo.store.StoreFileChannel#c8925d7
at org.neo4j.kernel.impl.nioneo.store.FileLock.wrapFileChannelLock(FileLock.java:38) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.impl.nioneo.store.FileLock.getOsSpecificFileLock(FileLock.java:93) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.DefaultFileSystemAbstraction.tryLock(DefaultFileSystemAbstraction.java:93) ~[neo4j-kernel-2.1.4.jar:2.1.4]
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:74) ~[neo4j-kernel-2.1.4.jar:2.1.4]
... 12 common frames omitted
UPDATE
Acted upon the advice given in the answer but unfortunately the server still doesn't start. neo4j start command has been waiting for server to start for the last 10 minutes:
Using additional JVM arguments: -server -XX:+DisableExplicitGC
-Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled Starting Neo4j Server...WARNING: not changing user process [29578]... waiting for
server to be ready.........
The log file says:
2015-02-18 15:50:09.958+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: [/var/lib/neo4j-community-2.1.4/data/graph.db/nioneo_logical.log.1] entries found=91485 lastEntryPos=5328191
2015-02-18 15:50:09.958+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Opened logical log [/var/lib/neo4j-community-2.1.4/data/graph.db/nioneo_logical.log.1] version=8, lastTxId=513504 (recovered)
2015-02-18 15:50:09.959+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: XaResourceManager[nioneo_logical.log] sorting 0 xids
2015-02-18 15:50:09.997+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: XaResourceManager[nioneo_logical.log] checkRecoveryComplete 0 xids
2015-02-18 15:50:10.407+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.relationshiptypestore.db.names rebuild id generator, highId=35 defragged count=0
2015-02-18 15:50:10.490+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.labeltokenstore.db.names rebuild id generator, highId=17 defragged count=0
2015-02-18 15:50:10.571+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.labeltokenstore.db rebuild id generator, highId=16 defragged count=0
2015-02-18 15:50:10.653+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.propertystore.db.index.keys rebuild id generator, highId=49 defragged count=0
2015-02-18 15:50:10.776+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.propertystore.db.index rebuild id generator, highId=44 defragged count=0
2015-02-18 15:50:10.819+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.propertystore.db.strings rebuild id generator, highId=41 defragged count=0
2015-02-18 15:50:11.101+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.propertystore.db.arrays rebuild id generator, highId=7954 defragged count=0
2015-02-18 15:50:15.753+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.propertystore.db rebuild id generator, highId=212690 defragged count=0
2015-02-18 15:50:19.113+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.relationshipstore.db rebuild id generator, highId=234591 defragged count=0
2015-02-18 15:50:19.155+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.nodestore.db.labels rebuild id generator, highId=1 defragged count=0
2015-02-18 15:50:20.131+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.nodestore.db rebuild id generator, highId=46820 defragged count=0
2015-02-18 15:50:20.194+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.schemastore.db rebuild id generator, highId=5 defragged count=0
2015-02-18 15:50:20.300+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore.relationshipgroupstore.db rebuild id generator, highId=14508 defragged count=0
2015-02-18 15:50:20.423+0000 INFO [o.n.k.i.n.s.StoreFactory]: /var/lib/neo4j-community-2.1.4/data/graph.db/neostore rebuild id generator, highId=9 defragged count=0
2015-02-18 15:50:20.424+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: XaResourceManager[nioneo_logical.log] recovery completed.
2015-02-18 15:50:20.424+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Recovery on log [/var/lib/neo4j-community-2.1.4/data/graph.db/nioneo_logical.log.1] completed.
2015-02-18 15:50:20.628+0000 INFO [o.n.k.i.t.TxManager]: TM opening log: /var/lib/neo4j-community-2.1.4/data/graph.db/tm_tx_log.2
2015-02-18 15:50:20.992+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Non clean shutdown detected on log [/var/lib/neo4j-community-2.1.4/data/graph.db/index/lucene.log.1]. Recovery started ...
2015-02-18 15:50:20.992+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: [/var/lib/neo4j-community-2.1.4/data/graph.db/index/lucene.log.1] logVersion=2 with committed tx=199234
My server previously had around 50K nodes and 300K relationships. Is the server attempting to recover the data, and hence causing the delay in starting?

The error message
org.neo4j.kernel.StoreLockException: Unable to obtain lock on store lock file: /var/lib/neo4j-community-2.1.4/data/graph.db/store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)
is pretty much self speaking. You either don't have the file system permission to access your graph.db folder or (which I think is more probable) that there is still another Neo4j process running on the same graph.db directory. You can check for running processes using the usual suspects like jps or ps aux | grep java.

I had the same problem with message Unable to obtain a lock on store lock file (...)
What happened? When I was setting up graph.db, acting as sudo, the owner was obviously root/root. Neo4j process was not allowed to access the place.
The solution which worked for me was to change the owner of graph.db folder with:
chown -R neo4j.neo4j /path/to/graphdb/graph.db/

Related

Neo4j.conf restart issue: ExitOnOutOfMemoryError

When using neo4j-admin memrec there is a recommendation to activate the following in the neo4j.conf file:
dbms.jvm.additional=-XX:+ExitOnOutOfMemoryError
However if I add the line in, I am unable to restart the neo4j service at all. If I check the debug log the service does not even begin to startup. Is there an error in that particular suggested config line that prevents the service from starting before it has even checked anything else?
:~$ sudo service neo4j restart
:~$ tail -f /var/log/neo4j/debug.log
2022-01-24 14:49:26.937+0000 INFO [o.n.d.d.DefaultDatabaseManager] Stopped 'DatabaseId{21dafb04[neo4j]}' successfully.
2022-01-24 14:49:26.937+0000 INFO [o.n.d.d.DefaultDatabaseManager] Stopping 'DatabaseId{00000000[system]}'.
2022-01-24 14:49:26.938+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] [system/00000000] Requirement `Database unavailable` makes database system unavailable.
2022-01-24 14:49:26.938+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] [system/00000000] DatabaseId{00000000[system]} is unavailable.
2022-01-24 14:49:26.939+0000 INFO [o.n.k.d.Database] [system/00000000] Waiting for closing transactions.
2022-01-24 14:49:26.940+0000 INFO [o.n.k.d.Database] [system/00000000] All transactions are closed.
2022-01-24 14:49:26.940+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] [system/00000000] Checkpoint triggered by "Database shutdown" # txId: 71 checkpoint started. ..
2022-01-24 14:49:26.956+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] [system/00000000] Checkpoint triggered by "Database shutdown" # txId: 71 checkpoint completed in 15ms
2022-01-24 14:49:26.956+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] [system/00000000] No log version pruned. The strategy used was '1 days'.
2022-01-24 14:49:26.974+0000 INFO [o.n.d.d.DefaultDatabaseManager] Stopped 'DatabaseId{00000000[system]}' successfully.

Unable to start neo4j with systemctl: 'Failed to load from plugin jar'

I've been trying to restart neo4j after adding new data on an EC2 instance. I stopped the neo4j instance, then I called systemctl start neo4j, but when I call cypher-shell it says Connection refused, and connection to the browser port doesn't work anymore.
In the beginning I assumed it was a heap space problem, since looking at the debug.log it said there was a memory issue. I adjusted the heap space and cache settings in neo4j.conf as recommended by neo4j-admin memrec, but still neo4j won't start.
Then I assumed it was because my APOC package was outdated. My neo4j version is 3.5.6, but APOC is 3.5.0.3. I download the latest 3.5.0.4 version, but still neo4j won't start.
At last I tried chmod 777 on every file in the data/database and plugin directories and the directories themselves, but still neo4j won't start.
What's strange is when I try neo4j console for all of these attempts, both cypher-shell and the neo4j browser port works just fine. However, obviously I would prefer to be able to launch neo4j with systemctl.
Right now the only hint of error I can find in debug.log is the following:
2019-06-19 21:19:55.508+0000 INFO [o.n.i.d.DiagnosticsManager] Storage summary:
2019-06-19 21:19:55.508+0000 INFO [o.n.i.d.DiagnosticsManager] Total size of store: 3.07 GB
2019-06-19 21:19:55.509+0000 INFO [o.n.i.d.DiagnosticsManager] Total size of mapped files: 3.07 GB
2019-06-19 21:19:55.509+0000 INFO [o.n.i.d.DiagnosticsManager] --- STARTED diagnostics for KernelDiagnostics:StoreFiles
END ---
2019-06-19 21:19:55.509+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Fulfilling of requirement 'Database available' mak
es database available.
2019-06-19 21:19:55.509+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Database is ready.
2019-06-19 21:19:55.568+0000 INFO [o.n.k.i.DatabaseHealth] Database health set to OK
2019-06-19 21:19:56.198+0000 WARN [o.n.k.i.p.Procedures] Failed to load `apoc.util.s3.S3URLConnection` from plugin jar `
/var/lib/neo4j/plugins/apoc-3.5.0.4-all.jar`: com/amazonaws/ClientConfiguration
2019-06-19 21:19:56.199+0000 WARN [o.n.k.i.p.Procedures] Failed to load `apoc.util.s3.S3Aws` from plugin jar `/var/lib/n
eo4j/plugins/apoc-3.5.0.4-all.jar`: com/amazonaws/auth/AWSCredentials
2019-06-19 21:19:56.200+0000 WARN [o.n.k.i.p.Procedures] Failed to load `apoc.util.s3.S3Aws$1` from plugin jar `/var/lib
/neo4j/plugins/apoc-3.5.0.4-all.jar`: com/amazonaws/services/s3/model/S3ObjectInputStream
2019-06-19 21:19:56.207+0000 WARN [o.n.k.i.p.Procedures] Failed to load `apoc.util.hdfs.HDFSUtils$1` from plugin jar `/v
ar/lib/neo4j/plugins/apoc-3.5.0.4-all.jar`: org/apache/hadoop/fs/FSDataInputStream
2019-06-19 21:19:56.208+0000 WARN [o.n.k.i.p.Procedures] Failed to load `apoc.util.hdfs.HDFSUtils` from plugin jar `/var
/lib/neo4j/plugins/apoc-3.5.0.4-all.jar`: org/apache/hadoop/fs/FSDataOutputStream
...
...
...
2019-06-19 21:20:00.678+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Shutting down database.
2019-06-19 21:20:00.679+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Shutdown started
2019-06-19 21:20:00.679+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Database is unavailable.
2019-06-19 21:20:00.684+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by "Database shutdown" # txId: 1
checkpoint started...
2019-06-19 21:20:00.704+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Checkpoint triggered by "Database shutdown" # txId: 1
checkpoint completed in 20ms
2019-06-19 21:20:00.705+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] No log version pruned, last checkpoint was made in vers
ion 0
2019-06-19 21:20:00.725+0000 INFO [o.n.i.d.DiagnosticsManager] --- STOPPING diagnostics START ---
2019-06-19 21:20:00.725+0000 INFO [o.n.i.d.DiagnosticsManager] --- STOPPING diagnostics END ---
2019-06-19 21:20:00.725+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Shutdown started
2019-06-19 21:20:05.875+0000 INFO [o.n.g.f.m.e.CommunityEditionModule] No locking implementation specified, defaulting
to 'community'
2019-06-19 21:20:06.080+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Creating database.
2019-06-19 21:20:06.154+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Requirement `Database available` makes database unavailable.
2019-06-19 21:20:06.156+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Database is unavailable.
2019-06-19 21:20:06.183+0000 INFO [o.n.i.d.DiagnosticsManager] --- INITIALIZED diagnostics START ---
I think the warning isn't an issue, since it's just a warning and not an error or exception. Also it seems that the database just shuts down automatically, and then restarts, creating an infinite loop. This loop does not happen when I call neo4j console (all the warnings still exist in the logs). All my ports are default.
Any clue why this is happening? I've never encountered this error when I previously launched neo4j on this instance.
If it works with neo4j console but not with systemctl, you should check the rights of the Neo4j folder.
I'm pretty sure you have a problem on it, and that the systemctl doesn't run Neo4j with the same user as you

neo4j failed to start on my machine

I use brew install neo4j, when i'm trying to start on terminal by neo4j start, it keep loading forever as following.
$ neo4j start Using additional JVM arguments: -server
-XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties
-Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -Dneo4j.ext.udc.source=homebrew
-Djava.awt.headless=true Starting Neo4j Server...WARNING: not changing user process [9320]... waiting for server to be ready ........................................................................... ........................................................................... ........................................................................... ......................................................................
Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
I checked some logs from neo4j already ...but it show nothing error
log messgea from /usr/local/Cellar/neo4j/2.1.6/libexec/data/graph.db/messages.log
2015-05-21 06:46:44.248+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/Cellar/neo4j/2.1.6/libexec/data/graph.db/neostore.schemastore.db] brickCount=0 brickSize=0b mappedMem=0b (storeSize=64b)
2015-05-21 06:46:44.248+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/Cellar/neo4j/2.1.6/libexec/data/graph.db/neostore.relationshipgroupstore.db] brickCount=0 brickSize=0b mappedMem=0b (storeSize=25b)
2015-05-21 06:46:44.249+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/Cellar/neo4j/2.1.6/libexec/data/graph.db/neostore] brickCount=0 brickSize=0b mappedMem=0b (storeSize=81b)
2015-05-21 06:46:44.310+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-05-21 06:46:44.333+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-05-21 06:46:44.414+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Opened logical log [/usr/local/Cellar/neo4j/2.1.6/libexec/data/graph.db/nioneo_logical.log.1] version=0, lastTxId=1 (clean)
2015-05-21 06:46:44.417+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: Rebuilding lucene scan store, this may take a while
2015-05-21 06:46:44.418+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: Lucene scan store rebuilt (roughly -1 nodes)
2015-05-21 06:46:44.421+0000 INFO [o.n.k.i.t.TxManager]: TM new log: tm_tx_log.1
2015-05-21 06:46:44.425+0000 INFO [o.n.k.i.t.KernelHealth]: Kernel health set to OK
log message from /usr/local/Cellar/neo4j/2.1.6/libexec/data/log/console.log
2015-05-21 06:46:43.878+0000 INFO [API] Setting startup timeout to: 120000ms based on -1
2015-05-21 06:57:03.825+0000 INFO [API] Successfully shutdown Neo4j Server.
I try to use brew to re-install neo4j, but it doesn't help.
i'm using mac machine.
java version /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java
Can you try to run bin/neo4j console to let it finish the startup.
Probably it is creating / updating an index or an internal structure that takes longer than the 120s timeout?
see
2015-05-21 06:46:44.417+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: Rebuilding lucene scan store, this may take a while
2015-05-21 06:46:44.418+0000 INFO [o.n.k.a.i.i.LuceneLabelScanStore]: Lucene scan store rebuilt (roughly -1 nodes)

Neo4j Enterprise Server 2.0.0M02 Fails to start

I just downloaded neo4j enterprise a few backs ago and had it set it up successfully to run on the cloud (EC2). It stored about 50 nodes in a span of 3 days, was just doing simple testing and playing with the database commands.
Today it suddenly terminated itself and 'failed to start'. On inspecting, message.log shows this:
/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db.names non clean shutdown detected
2013-05-04 05:39:29.957+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db.names] brickCount=0 brickSize=0b mappedMem=0b (storeSize=38b)
2013-05-04 05:39:29.959+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db non clean shutdown detected
2013-05-04 05:39:29.960+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db] brickCount=0 brickSize=0b mappedMem=0b (storeSize=0b)
2013-05-04 05:39:29.960+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.strings non clean shutdown detected
2013-05-04 05:39:29.960+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.strings] brickCount=3 brickSize=28288b mappedMem=28311552b (storeSize=84864b)
2013-05-04 05:39:29.961+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index.keys non clean shutdown detected
2013-05-04 05:39:29.961+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index.keys] brickCount=0 brickSize=0b mappedMem=0b (storeSize=874b)
2013-05-04 05:39:29.962+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index non clean shutdown detected
2013-05-04 05:39:29.962+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index] brickCount=0 brickSize=0b mappedMem=0b (storeSize=198b)
2013-05-04 05:39:29.963+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.arrays non clean shutdown detected
2013-05-04 05:39:29.963+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.arrays] brickCount=1 brickSize=32384b mappedMem=32505856b (storeSize=32384b)
2013-05-04 05:39:29.972+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db non clean shutdown detected
2013-05-04 05:39:29.972+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db] brickCount=12 brickSize=33538b mappedMem=33554432b (storeSize=402456b)
2013-05-04 05:39:29.978+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshipstore.db non clean shutdown detected
2013-05-04 05:39:29.978+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshipstore.db] brickCount=0 brickSize=40887b mappedMem=40894464b (storeSize=33b)
2013-05-04 05:39:29.978+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db.labels non clean shutdown detected
2013-05-04 05:39:29.978+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db.labels] brickCount=0 brickSize=0b mappedMem=0b (storeSize=68b)
2013-05-04 05:39:29.980+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db non clean shutdown detected
2013-05-04 05:39:29.980+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db] brickCount=3 brickSize=8386b mappedMem=8388608b (storeSize=25158b)
2013-05-04 05:39:29.981+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.schemastore.db non clean shutdown detected
2013-05-04 05:39:29.981+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.schemastore.db] brickCount=0 brickSize=0b mappedMem=0b (storeSize=64b)
2013-05-04 05:39:29.983+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore non clean shutdown detected
2013-05-04 05:39:29.983+0000 INFO [o.n.k.i.n.s.StoreFactory]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore] brickCount=0 brickSize=0b mappedMem=0b (storeSize=54b)
2013-05-04 05:39:30.023+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: Non clean shutdown detected on log [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/nioneo_logical.log.1]. Recovery started ...
2013-05-04 05:39:30.029+0000 INFO [o.n.k.i.t.x.XaLogicalLog]: [/usr/local/neo4j-enterprise-2.0.0/data/graph.db/nioneo_logical.log.1] logVersion=8 with committed tx=503
2013-05-04 05:39:30.071+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db.names hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.071+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshiptypestore.db hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.071+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.strings hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.071+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index.keys hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.071+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.index hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.075+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db.arrays hit=0 miss=2 switches=0 ooe=0
2013-05-04 05:39:30.080+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.propertystore.db hit=0 miss=33 switches=0 ooe=0
2013-05-04 05:39:30.080+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.relationshipstore.db hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.080+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db.labels hit=0 miss=0 switches=0 ooe=0
2013-05-04 05:39:30.081+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.nodestore.db hit=0 miss=33 switches=0 ooe=0
2013-05-04 05:39:30.081+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore.schemastore.db hit=0 miss=1 switches=0 ooe=0
2013-05-04 05:39:30.083+0000 INFO [o.n.k.i.n.s.StoreFactory]: /usr/local/neo4j-enterprise-2.0.0/data/graph.db/neostore hit=0 miss=3 switches=0 ooe=0
2013-05-04 05:39:30.084+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics START ---
2013-05-04 05:39:30.084+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics END ---
2013-05-04 05:39:30.085+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#58e5f46e' was successfully initialized, but failed to start. Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#5b0d95cd' was successfully initialized, but failed to start. Please see attached cause exception.: NodeRecord[1231] not in use
enter code here
the /logs folder contains console.log which shows this:
(NeoStoreXaDataSource.java:310)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 15 more
5/4/13 5:35:31 AM org.neo4j.server.CommunityBootstrapper SEVERE: Failed to start Neo Server on port [7474]
5/4/13 5:39:28 AM org.neo4j.server.CommunityBootstrapper WARNING: WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
5/4/13 5:39:28 AM org.neo4j.server.AbstractNeoServer INFO: Setting startup timeout to: 120000ms based on -1
Detected incorrectly shut down database, performing recovery..
05:39:29.132 [main] WARN o.neo4j.kernel.EmbeddedGraphDatabase - WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
5/4/13 5:39:30 AM org.neo4j.server.CommunityBootstrapper SEVERE:
java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#58e5f46e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:314)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:89)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:205)
at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:115)
at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:59)
at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:70)
at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:286)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:129)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:86)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:49)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#58e5f46e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
aused by: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException
... 10 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#5b0d95cd' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:128)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 12 more
Caused by: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: NodeRecord[1231] not in use
at org.d incorrectly shut down database, performing recovery..
05:39:29.132 [main] WARN o.neo4j.kernel.EmbeddedGraphDatabase - WARNING! You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
5/4/13 5:39:30 AM org.neo4j.server.CommunityBootstrapper SEVERE:
java.lang.RuntimeException: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#58e5f46e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:314)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:89)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:205)
at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:115)
at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:59)
at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:70)
at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:286)
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:129)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:86)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:49)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#58e5f46e' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
aused by: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException
... 10 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#5b0d95cd' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:497)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:104)
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:128)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 12 more
Caused by: org.neo4j.kernel.impl.nioneo.store.InvalidRecordException: NodeRecord[1231] not in use
at org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:239)
at org.neo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:112)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.gatherUpdatesFromPropertyCommands(WriteTransaction.java:692)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.convertIntoLogicalPropertyUpdates(WriteTransaction.java:669)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.applyCommit(WriteTransaction.java:619)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.doCommit(WriteTransaction.java:561)
at org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:321)
eo4j.kernel.impl.nioneo.store.NodeStore.getRecord(NodeStore.java:112)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.gatherUpdatesFromPropertyCommands(WriteTransaction.java:692)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.convertIntoLogicalPropertyUpdates(WriteTransaction.java:669)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.applyCommit(WriteTransaction.java:619)
at org.neo4j.kernel.impl.nioneo.xa.WriteTransaction.doCommit(WriteTransaction.java:561)
at org.neo4j.kernel.impl.transaction.xaframework.XaTransaction.commit(XaTransaction.java:321)
at org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.injectTwoPhaseCommit(XaResourceManager.java:407)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyTwoPhaseCommitEntry(XaLogicalLog.java:562)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyEntry(XaLogicalLog.java:437)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.doInternalRecovery(XaLogicalLog.java:771)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:206)
at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:161)
at org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:64)
at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.start(NeoStoreXaDataSource.java:310)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 15 more
5/4/13 5:39:30 AM org.neo4j.server.CommunityBootstrapper SEVERE: Failed to start Neo Server on port [7474]
I'm not a JAVA programmer so I do not know how to debug this issue. I mainly use node-neo4j (node.js) to talk to my neo4j server.
Please help thank you.
Check out this post in the Neo4j google group.
https://groups.google.com/forum/#!topic/neo4j/3BVM4kmso5c
While it may work for a while on Java 6, eventually you are going to encounter some bugs due to wrong JDK versions. Update to Java 7 and the problem should disappear.
If it doesn't, please also make sure you are not running OpenJDK but Oracle JDK.
The exception says:
You are using an unsupported Java runtime. Please use Oracle(R)
Java(TM) Runtime Environment 7.
You are probably running java version 5 or 6. You can download Java SE 7 from the oracle website.

Problems restarting neo4j 1.7 server

I am trying to restart my Neo4j instance and see no errors in either my messages.log or console.log.
I do see recovery notices in messages, however my start script always returns:
waiting for server to be ready............................................... BAD
console.log:
9/12/12 6:37:48 PM org.neo4j.server.NeoServerWithEmbeddedWebServer INFO: Starting Neo Server on port [7474] with [20] threads available
9/12/12 6:37:48 PM org.neo4j.server.NeoServerWithEmbeddedWebServer INFO: Enabling HTTPS on port [7473]
9/12/12 6:37:48 PM org.neo4j.server.database.Database INFO: Using database at /db/data
messages.log:
2012-09-12 18:37:49.059+0000: Non clean shutdown detected on log [/srv/neo4j/graphdb/data/nioneo_logical.log.1]. Recovery started ...
2012-09-12 18:37:49.067+0000: [/srv/neo4j/graphdb/data/nioneo_logical.log.1] logVersion=244 with committed tx=18015029
2012-09-12 18:37:55.391+0000: [/srv/neo4j/graphdb/data/nioneo_logical.log.1] entries found=203005 lastEntryPos=8387712
2012-09-12 18:37:55.391+0000: Internal recovery completed, scanned 203005 log entries. Recovered 23260 transactions. Last tx recovered: 18038289
2012-09-12 18:37:55.392+0000: XaResourceManager[/srv/neo4j/graphdb/data/nioneo_logical.log] sorting 0 xids
2012-09-12 18:37:55.393+0000: XaResourceManager[/srv/neo4j/graphdb/data/nioneo_logical.log] checkRecoveryComplete 0 xids
2012-09-12 18:37:58.033+0000: /srv/neo4j/graphdb/data/neostore.relationshiptypestore.db.names rebuild id generator, highId=4 defragged count=0
2012-09-12 18:37:58.053+0000: /srv/neo4j/graphdb/data/neostore.propertystore.db.index.keys rebuild id generator, highId=7 defragged count=0
2012-09-12 18:37:58.069+0000: /srv/neo4j/graphdb/data/neostore.propertystore.db.index rebuild id generator, highId=6 defragged count=0
2012-09-12 18:37:58.096+0000: /srv/neo4j/graphdb/data/neostore.propertystore.db.strings rebuild id generator, highId=16265 defragged count=0
2012-09-12 18:37:58.108+0000: /srv/neo4j/graphdb/data/neostore.propertystore.db.arrays rebuild id generator, highId=1 defragged count=0
2012-09-12 18:37:58.507+0000: /srv/neo4j/graphdb/data/neostore.propertystore.db rebuild id generator, highId=3052890 defragged count=0
2012-09-12 18:37:58.903+0000: /srv/neo4j/graphdb/data/neostore.relationshipstore.db rebuild id generator, highId=9188555 defragged count=0
2012-09-12 18:37:58.929+0000: /srv/neo4j/graphdb/data/neostore.nodestore.db rebuild id generator, highId=1183312 defragged count=0
2012-09-12 18:37:58.942+0000: /srv/neo4j/graphdb/data/neostore rebuild id generator, highId=6 defragged count=0
2012-09-12 18:37:58.946+0000: XaResourceManager[/srv/neo4j/graphdb/data/nioneo_logical.log] recovery completed.
2012-09-12 18:37:58.946+0000: Recovery on log [/srv/neo4j/graphdb/data/nioneo_logical.log.1] completed.
2012-09-12 18:37:58.962+0000: TM opening log: /srv/neo4j/graphdb/data/tm_tx_log.1
2012-09-12 18:37:58.994+0000: Non clean shutdown detected on log [/srv/neo4j/graphdb/data/index/lucene.log.2]. Recovery started ...
2012-09-12 18:37:58.994+0000: [/srv/neo4j/graphdb/data/index/lucene.log.2] logVersion=99 with committed tx=10257784
Recovery of lucene takes too long. Please use bin/neo4j console to start it once in foreground mode to finish the recovery.

Resources