Unable to connect from remote client

I ran up a Ubuntu server on AWS, then installed neo4j using the package manager:

  • the AWS security groups allow TCP traffic on 7474, and 7687, for both IP4 and IP6
  • I modified the neo4j config to prefer the IP4 stack
  • After a reboot the neo4j log files show bolt enabled and remote interface ready at 7474
  • netstat shows that neo4j is listening on 7474 and 7687
  • pktstat shows that the requests to 7474 are making it to the neo4j machine
  • when I curl from the localhost to 7474, I get a JSON response (good)
  • when I use cypher-shell from the localhost is works no problems

BUT:

  • when I try to access port 7474 from the browser of a remote client, there is no response
  • when I curl to port 7474 from a remote client, it says connection refused

Any assistance appreciated.

have you opened up the ports for incoming traffic in AWS?

Hope you enabled remote connections by updating listen_address for both bolt & http .
like..
dbms.connector.bolt.listen_address=0.0.0.0:7687

Yes, the AWS security groups allow TCP traffic on 7474, and 7687, for both IP4 and IP6, and pktstat shows that the requests to 7474 are making it to the neo4j machine.

Thanks! Inspired by your response, I had a closer look at the config file (network section) and found the following three lines:

# With default configuration Neo4j only accepts local connections.
# To accept non-local connections, uncomment this line:
# dbms.default_listen_address=0.0.0.0

I un-commented the third line and it now works fine.

1 Like