Connection Error using Python Driver


So I am working within a closed AWS environment and have set up Neo4j 4.0.3 Community edition. When connecting to the server using the python driver with neobolt I receive no issue on the local machine. I have opened the respective ports and firewall settings to allow other EC2 instances to access the server. On a separate EC2 instance trying to connect to the server remotely I can access it via browser but using the python driver I cannot connect to the server. Please see the following code:

from neo4j import GraphDatabase
uri = "bolt://:7687"
driver = GraphDatabase.driver(uri,auth=("user","pass"),encrypted=False)

Which produces the following error when initializing the driver:

FileNotFoundError: [Errno 2] No such file or directory

This is a fresh Neo4j server so there is no data within the software. I am just trying to set up the connection so my employees can start populating the database from their respective EC2 instances. If anyone can please provide some insight or places to check please let me know!


Note, I have removed the IP address within the bolt connections so please do not point that out as I am aware.

Your uri seems to lack the hostname to connect to. Also make sure your AWS security settings do allow communication on port 7687.

Good evening,
You could also check the /etc/neo4j/neo4j.conf file look at default_listen_address setting.

Yours kindly

In the first comment on the post I said how I removed the host IP so I am aware it is not in the above code. On the ports, everything is open and should be able to connect. I have no issues opening up the browser interface with the url on port 7474.

Which version of the python driver you're using?

So after checking everything this morning I am using python driver version 1.7.6.


Could you show us your neo4j.conf file on the remote server?