Kubernetes pod FileLockException: Lock file has been locked



根据我们Kubernetes部署的neo4j 4.2的一部分,我们得到了这个异常。我们只有一个吊舱在运行,现在它进入了崩溃状态。后端是谷歌的文件存储,但目前还没有人访问它。需要帮助-

2021-09-16 17:43:00.981+0000 INFO  Starting...
2021-09-16 17:43:02.873+0000 INFO  ======== Neo4j 4.2.9 ========
2021-09-16 17:43:08.511+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address.
java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:207) ~[neo4j-4.2.9.jar:4.2.9]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:163) ~[neo4j-4.2.9.jar:4.2.9]
at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.2.9.jar:4.2.9]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:134) [neo4j-4.2.9.jar:4.2.9]
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:90) [neo4j-4.2.9.jar:4.2.9]
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:35) [neo4j-4.2.9.jar:4.2.9]
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.internal.locker.LockerLifecycleAdapter@a8a8b75' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file has been locked by another process: /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)".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.2.9.jar:4.2.9]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.2.9.jar:4.2.9]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198) ~[neo4j-4.2.9.jar:4.2.9]
... 5 more
Caused by: org.neo4j.kernel.internal.locker.FileLockException: Lock file has been locked by another process: /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)
at org.neo4j.kernel.internal.locker.Locker.storeLockException(Locker.java:175) ~[neo4j-kernel-4.2.9.jar:4.2.9]
at org.neo4j.kernel.internal.locker.Locker.checkLock(Locker.java:95) ~[neo4j-kernel-4.2.9.jar:4.2.9]
at org.neo4j.kernel.internal.locker.GlobalFileLocker.checkLock(GlobalFileLocker.java:58) ~[neo4j-kernel-4.2.9.jar:4.2.9]
at org.neo4j.kernel.internal.locker.GlobalLocker.checkLock(GlobalLocker.java:28) ~[neo4j-kernel-4.2.9.jar:4.2.9]
at org.neo4j.kernel.internal.locker.LockerLifecycleAdapter.start(LockerLifecycleAdapter.java:36) ~[neo4j-kernel-4.2.9.jar:4.2.9]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.2.9.jar:4.2.9]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.2.9.jar:4.2.9]
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198) ~[neo4j-4.2.9.jar:4.2.9]
... 5 more
2021-09-16 17:43:08.515+0000 INFO  Neo4j Server shutdown initiated by request
2021-09-16 17:43:08.515+0000 INFO  Stopped.

不建议使用google filestore代替常规的持久卷声明;出于性能原因,Neo4j需要高速、高性能的本地磁盘,通常他们推荐使用ssd。使用像云抽象这样的文件存储,如果它工作的话,可能会导致性能下降。

一般来说,您看到的错误是指磁盘上的文件被另一个进程锁定。这可能是因为Neo4j的上一个(崩溃的)版本锁定了它,或者可能是由于容量问题,这里您必须深入研究filestore如何在GKE之类的东西上提供POSIX投诉驱动器。

相关内容

  • 没有找到相关文章