Neo4j: Unable to lock store

此生再无相见时 提交于 2019-12-19 22:02:34

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/11309266/neo4j-unable-to-lock-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!