cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Failed to start NEo4j instance deployed on Amazon EC2

All I did was add the following line to the neo4j.template:

dbms.connector.https.listen_address=0.0.0.0:443

And I keep getting the following error in the logs:

pre-neo4j.sh[14410]: Failed to start Neo4j on 0.0.0.0:7474: At least one of the addresses 0.0.0.0:7474:7474 or 0.0.0.0:443 is already in use, cannot bind to it.

pre-neo4j.sh[14410]: 2020-11-19 06:04:35.751+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If f missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /var/lib/neo4j/data/databases

pre-neo4j.sh[14410]: java.lang.RuntimeException: Error starting Neo4j database server at /var/lib/neo4j/data/databases

Any tips or info on why this keeps happening? EDIT: I've ensured port 443 is not in use.

1 ACCEPTED SOLUTION

This is a better setup than what I currently have. Will try this in the future. Thanks!

View solution in original post

4 REPLIES 4

if you change

dbms.connector.https.listen_address=0.0.0.0:443

do a different port number, for example

dbms.connector.https.listen_address=0.0.0.0:7473

which is the default Neo4j https port, do you continue to experience failure?

I can't use port 7473 as it is not compatible with Cloudflare's proxy. However, changing from port 443 to any one of the other HTTPS ports supported by Cloudflare solved the problem. Though that doesn't explain why Neo4j wasn't able to start when I set dbms.connector.https.listen_address=0.0.0.0:443.

Steps to start Neo4j in EC2:

  1. Launch EC2 instance using AMI
  2. Download and set up openVPN
  3. set up public and private subnet inside VPC
  4. set up security groups
  5. set up NAT gateway in side public subnet to allow private subnet to access the internet

This is a better setup than what I currently have. Will try this in the future. Thanks!