Biscuit Coder
Biscuit Coder

Reputation: 477

Neo4j: Unable to lock store

I'm using Neo4j graph DB and viewing the data on the browser. So whenever I run a code, i need to change database location field in neo4j-server.properties file.

When i try to access DB with browser on I'm getting the following error:

Exception in thread "main" java.lang.IllegalStateException: Unable to lock store
[<DB path>], this is usually a result of some other Neo4j kernel running using
the same store.

Is it possible to view the database without locking the store?

Upvotes: 4

Views: 3150

Answers (2)

gpoo
gpoo

Reputation: 8638

There is another process using the db. For instance, you opened it with another program (e.g. a gremlin shell in a terminal) or there is another neo4j instance running.

If you are using a Unix-like system (Linux, MacOSX, etc.), then you can use lsof to determine the processes that have opened your db. For instance, if the path to my db is /home/user/db/myneo4j.db, then I would search for:

$ lsof /home/user/db/myneo4j.db/neostore.propertystore.db.index

Or you can just try:

$ lsof | grep myneo4j.db

That will tell you the process ID that has taken (locked) the database.

Upvotes: 3

Peter Neubauer
Peter Neubauer

Reputation: 6331

Are you sure no java process is running against the datastore before you start the neo4j server to view your data?

Upvotes: 1

Related Questions