目录
问题
今日启动Neo4j失败,Error日志:
Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@565b064f' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its lock file has been locked by another process: C:\Users\LENOVO\.Neo4jDesktop\neo4jDatabases\database-ff8a74ba-2ca9-47e7-9ae2-3970f74f40c8\installation-3.5.2\data\databases\store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@565b064f' was successfully initialized, but failed to start. Please see the attached cause exception "Store and its lock file has been locked by another process: C:\Users\LENOVO\.Neo4jDesktop\neo4jDatabases\database-ff8a74ba-2ca9-47e7-9ae2-3970f74f40c8\installation-3.5.2\data\databases\store_lock. Please ensure no other process is using this database, and that the directory is writable (required even for read-only access)".
分析
从log日志我们能够得出,大概是因为这个store_lock锁文件。
WIN解决方案
1. 把Neo4j先关闭,然后把该文件删除。
如果提示说:该文件被其他应用程序使用,请重试。那就打开任务管理器,把Java process干掉。
2. 然后重启Neo4j即可。
Linux解决方案
找到进程
ps aux | grep "org.neo4j.server"
kill the process
kill -9 <pid-of-neo4js-java-process>
删除store_lock文件
sudo rm /你自己的路径/store_lock