Could not connect to Neo4j database within neo4j-advanced-rag LangChain template

I'm using the neo4j-advanced-rag LangChain template (neo4j-advanced-rag | 🦜️🔗 Langchain). I followed exactly the steps described in the documentation. In my app I set the correct NEO4J_URI, NEO4J_USERNAME and NEO4J_PASSWORD.
The AuraDB neo4j is up and running, I can explore data and make queries using the browser interface.
Despite this, I get the following error when starting langchain serve:
ValueError: Could not connect to Neo4j database. Please ensure that the url is correct

How could I solve this problem?

1 Like

Facing the same issue with LangChain Neo4J integration. Any possible causes of the issue?

Can you share your code?
How / where do you set the environment variables?

Facing this issue, I solved by adding the port at the end of the url.
For example, instead of neo4j+s://<dbid>.databases.neo4j.io, try this neo4j+s://<dbid>.databases.neo4j.io:7687

I tried it. It gives the same error :(