Issue connecting to Noe4j Aura with Python 'neo4j' driver

650 views Asked by At

I attempted to connect neo4j aura database using Python but failed as "Unable to retrieve routing information".

from neo4j import GraphDatabase
from neo4j.debug import watch

uri = "neo4j+s://<id>.databases.neo4j.io"
driver = GraphDatabase.driver(uri, auth=("neo4j", "<password>"))

def workload(tx):
    return tx.run("RETURN 1 as n").data()

with watch("neo4j"):  # enable logging
    with driver.session() as session:
        session.write_transaction(workload)

driver.close()

Running above python scripts returned the following log:

Attempting to update routing table from IPv4Address(('<id>.databases.neo4j.io', 7687))
[#0000]  C: <RESOLVE> <id>.databases.neo4j.io:7687
[#0000]  C: <OPEN> xx.xxx.xxx.xxx:7687
[#C000]  C: <SECURE> <id>.databases.neo4j.io

[#0000]  C: <CONNECTION FAILED> BoltSecurityError: [SSLCertVerificationError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 1: Operation not permitted)
Failed to fetch routing info 35.xxx.xxx.xxx:7687

[#0000]  C: <ROUTING> Deactivating address IPv4Address(('<id>.databases.neo4j.io', 7687))
[#0000]  C: <ROUTING> table={None: RoutingTable(database=None routers={}, readers={}, writers={}, last_updated_time=0.235748575, ttl=0)}
Attempting to update routing table from 
Unable to retrieve routing information
Transaction failed and will be retried in 1.1281720312998946s (Unable to retrieve routing information)

I looked into neo4j documentation and searched other places but none of the possible resolutions can be found.

Version: Python 3.7.4 neo4j 4.4.2

I very much appreciate your input if you have ever experienced the same issues and found any way to resolve the issue.

0

There are 0 answers