Neo4j:无法锁定商店 [英] Neo4j: Unable to lock store

查看:311
本文介绍了Neo4j:无法锁定商店的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Neo4j图形数据库并查看浏览器上的数据。因此,无论何时我运行代码,我都需要在neo4j-server.properties文件中更改数据库位置字段。



当我尝试使用浏览器访问数据库时,以下错误:

 线程main中的异常java.lang.IllegalStateException:无法锁定存储
[< ; DB路径>],这通常是其他一些Neo4j内核运行时使用同一个存储
的结果。

是否可以在不锁定商店的情况下查看数据库?

解决方案

还有另一个使用db的进程。例如,你用另一个程序(例如终端中的gremlin shell)打开它,或者运行另一个neo4j实例。



如果您使用的是类Unix系统(Linux,MacOSX等),那么你可以使用lsof来确定打开你的数据库的进程。例如,如果我的数据库的路径是 /home/user/db/myneo4​​j.db ,那么我会搜索:

  $ lsof /home/user/db/myneo4​​j.db/neostore.propertystore.db.index 

或者您可以尝试:

  $ lsof | grep myneo4​​j.db 

这会告诉你已经取得(锁定)数据库的进程ID。 / p>

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?

解决方案

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.

这篇关于Neo4j:无法锁定商店的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆