2 years ago

#72976

test-img

Jason Kang

How to access Neo4j remotely

I am hosting a Neo4j server on my laptop, and I am trying to access it via an amazon EC2 instance. I am using Neo4j desktop to run the server.

I've configured my server to accept external traffic:

dbms.default_listen_address=0.0.0.0
dbms.connector.bolt.listen_address=0.0.0.0:7687
dbms.connector.http.address=0.0.0.0:7474

I use a reverse ssh from my laptop -> ec2 instance to expose ports 7474 and 7487. I use a reverse ssh from server -> client because my laptop is private and I don't want to port forward from my public IP.

ssh -R7687:localhost:7687 -R7474:localhost:7474 ec2-user@EC2IP

On my EC2 instance, I am using self.driver = GraphDatabase.driver(bolt://localhost:7687", auth=auth, max_transaction_retry_time=20)to access the database. It fails with error

Failed to establish connection to ResolvedIPv6Address(('::1', 7687, 0, 0)) (reason [Errno 99] Cannot assign requested address))
2022-01-20 00:36:28 neo4j WARNING: Transaction failed and will be retried in 1.6414348276387707s (Couldn't connect to localhost:7687 (resolved to ('127.0.0.1:7687', '[::1]:7687')):

linux

database

networking

ssh

neo4j

0 Answers

Your Answer

Accepted video resources