3

I've been playing around with neo4j recently on my Debian 7.8 install. It's awesome!

Today I imported around 100000 nodes and 150000 relationships using neo4j-import tool. I stopped the neo4j service and copied the imported database to /var/lib/neo4j/data/graph.db - but now Neo4j service won't start

Starting Neo4j Server...WARNING: not changing user
process [4963]... waiting for server to be ready....... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.

Which is weird because it doesn't wait 120 seconds to start - 5 at most. The only log that is produced is console.log in /var/log/neo4j

2015-07-01 00:10:24.363+0000 INFO  [API] Setting startup timeout to: 120000ms based on 120000
2015-07-01 00:10:26.501+0000 INFO  [API] Successfully shutdown Neo4j Server.

which isn't very useful. When I remove the database, neo4j is able to start. I copied graph.db to my windows installation and it works well, I can search through nodes etc. so perhaps it has something to do with configuration on my Debian? I added a line in /etc/neo4j/neo4j-server.properties

 org.neo4j.server.startup_timeout=0

but this changed nothing, service start still times out after several seconds. Any ideas?

Here's graph.db messages.log - nothing gets appended when I try to start the service

2015-07-01 01:58:12.142+0000 INFO  [org.neo4j]: Import starting
2015-07-01 01:58:12.282+0000 INFO  [org.neo4j]: Creating new db @ /var/www/ddl/scripts/./graph.db/neostore
2015-07-01 01:58:13.238+0000 INFO  [org.neo4j]: Missing counts store, rebuilding it.
2015-07-01 01:58:13.607+0000 INFO  [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-07-01 01:58:13.663+0000 INFO  [org.neo4j]: No lucene scan store index found, this might just be first use. Preparing to rebuild.
2015-07-01 01:58:13.952+0000 INFO  [org.neo4j]: Rebuilding lucene scan store, this may take a while
2015-07-01 01:58:13.955+0000 INFO  [org.neo4j]: Lucene scan store rebuilt (roughly -1 nodes)
2015-07-01 01:58:30.337+0000 INFO  [org.neo4j]: IMPORT DONE in 18s 182ms. Imported:
  95941 nodes
  158227 relationships
  369482 properties
2015-07-01 01:58:30.341+0000 INFO  [org.neo4j]: About to rotate counts store at transaction 1 to [/var/www/ddl/scripts/./graph.db/neostore.counts.db.b], from [/var/www/ddl/scripts/./graph.db/neostore.counts.db.a].
2015-07-01 01:58:30.344+0000 INFO  [org.neo4j]: Successfully rotated counts store at transaction 1 to [/var/www/ddl/scripts/./graph.db/neostore.counts.db.b], from [/var/www/ddl/scripts/./graph.db/neostore.counts.db.a].
Marcin Wasilewski
  • 685
  • 1
  • 10
  • 26
  • belongs on dba.stackexchange.com – zero323 Jul 01 '15 at 00:32
  • neo4j docs suggest asking here http://neo4j.com/docs/stable/community-support.html – Marcin Wasilewski Jul 01 '15 at 00:41
  • Please read [What topics can I ask about here?](http://stackoverflow.com/help/on-topic) and compare it with [an on topic section on dba.stackexchange.com](http://dba.stackexchange.com/help/on-topic). – zero323 Jul 01 '15 at 01:18
  • 1
    Marcin, can you check graph.db/messages.log ? Are both, the neo4j-import and the neo4j-server the same version? – Michael Hunger Jul 01 '15 at 05:30
  • Hi Michael. I edited my post to add messages.log. There aren't any errors. and nothing gets appended to the log when I try to start the server. Yes, I installed neo4j with apt-get using instructions on neo4j website and I imported the data on that same server. – Marcin Wasilewski Jul 01 '15 at 11:37

1 Answers1

1

It turns out that what I needed to do is make sure my permissions are right. I fixed it with

chown -r Neo4j:adm graph.db

and everything seems to work fine now. I think Neo4j should produce some sort of warning if it can't access graph.db. Now it just exits without any log

Marcin Wasilewski
  • 685
  • 1
  • 10
  • 26
  • Lifesaver! +1 on better error log messaging int the neo4j consol.log – Ray Jul 02 '15 at 18:32
  • Yes, I'll be able to do that in an hour :) And agreed, neo4j rocks but the messages suck, in general. I raised an issue on github so hopefully they will step up their logging game. – Marcin Wasilewski Jul 02 '15 at 22:56
  • I now run the import tool by doing a sudo as the neo4j user `sudo -u neo4j neo4j-import ....` – Ray Jul 04 '15 at 20:05