Neo4J fails to start when ssh tunnel is present


I have installed Neo4J on a Debian 10 server. I followed the guide:

When I run neo4j start, the database fails to start. I report the log:

2020-07-24 16:38:34.995+0000 INFO  Starting...
2020-07-24 16:38:36.979+0000 INFO  ======== Neo4j 4.1.0 ========
2020-07-24 16:38:42.221+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. Error starting Neo4j database server at /var/$
java.lang.RuntimeException: Error starting Neo4j database server at /var/lib/neo4j/data/databases
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(
        at org.neo4j.server.CommunityBootstrapper.createNeo(
        at org.neo4j.server.NeoBootstrapper.start(
        at org.neo4j.server.NeoBootstrapper.start(
        at org.neo4j.server.CommunityEntryPoint.main(
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component '' was successfully initialized, but failed to start. Please see the attached cause exception "Lock file $
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(
        at org.neo4j.kernel.lifecycle.LifeSupport.start(
        at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(
        ... 5 more
Caused by: Lock file has been locked by another process: /var/lib/neo4j/data/databases/store_lock. Please ensure no other process is using this database, and that the directory is writ$
        at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(
        ... 7 more
2020-07-24 16:38:42.221+0000 INFO  Neo4j Server shutdown initiated by request

My network looks like this:
Laptop -- Proxy server -- Debian Server with Neo4J

I create the following tunnel, in order to access Neo4J from my browser:
ssh -i pem_key.pem -L 7474:debian_server:7474 -L 7687:debian_server:7687 filippo@proxy_server

It looks like that Neo4J stops woorking when this tunnel is present.

Any ideas about what the problem could be? Am I doing something wrong in this? :slight_smile:

Please carefully look at prerequisites section of the Manual.It says something like this

Java Prerequisites (Oracle Java, Debian 9+ and Ubuntu 16.04+ only)

Neo4j 4.1 requires the Java 11 runtime. Java 11 is not included in Ubuntu 16.04 LTS or Debian 9 (stretch) and will have to be set up manually prior to installing or upgrading to Neo4j 4.1, as described below. Debian 9 users can find OpenJDK 11 in backports. Debian 10 and Ubuntu 18.04 onwards already have the Openjdk Java 11 package available through apt .

Have you fulfilled all the necessary prerequisites?

1 Like

Hello @sameerG, Thanks for your reply. I have added some details which I just discovered.
Neo4J works. It stops working when I create a tunnel.

hello, I got the same problem like this. Can you tell me how did you fix the problem and what detials did you disvovered?