<p>As per part of our Kubernetes deployment of neo4j 4.2, we are getting this exception. We got only 1 pod running and now its going into CrashloopBackoff. The backend is Google filestore, but as of now no one is accessing that. Need help -</p>
<pre><code>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 &quot;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)&quot;.
        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.
</code></pre>

Paras Bansal
<p>Using google filestore in lieu of regular persistent volume claims is not recommended; for performance reasons Neo4j needs high speed, performant local disks, typically they recommend SSDs.  Using a filestore like cloud abstraction, if it works, is likely to result in degraded performance.</p>
<p>Now in general, the error you're seeing refers to files on disk being locked by a different process.  This can happen because a previous (crashed) version of Neo4j locked it, or it could be due to volume issues, here is where you'd have to research deep into how filestore provides a POSIX complaint drive on something like GKE.</p>
