Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to Neo4j database. #10

Open
BishenCheng opened this issue Oct 6, 2024 · 7 comments
Open

Could not connect to Neo4j database. #10

BishenCheng opened this issue Oct 6, 2024 · 7 comments

Comments

@BishenCheng
Copy link

BishenCheng commented Oct 6, 2024

Hello author, I did not generate the env file after deploying docker, so I tried to create a .env directly and used NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your_password, but this won't work,
Specific error message: ValueError: Could not connect to Neo4j database. Please ensure that the url is correct,
ServiceUnavailable: Cannot to connect to Bolt service on ResolvedIPv6Address(('::1', 7474, 0, 0)) (looks like HTTP),
What should I do
image-1

@BishenCheng
Copy link
Author

BishenCheng commented Oct 6, 2024

I also tried NEO4J_USERNAME=neo4j NEO4J_PASSWORD=neo4j

@BishenCheng
Copy link
Author

And NEO4J_URI=bolt://localhost:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your_password,can work in my Browser

@RajSharma1902
Copy link

how did you solve this?

@dipakmeher
Copy link

Can anyone please help me with this error?

@RajSharma1902
Copy link

Can anyone please help me with this error?

can you be more specific like what is the error you are encountering?

@RajSharma1902
Copy link

Hello author, I did not generate the env file after deploying docker, so I tried to create a .env directly and used NEO4J_URI=bolt://localhost:7687 NEO4J_USERNAME=neo4j NEO4J_PASSWORD=your_password, but this won't work, Specific error message: ValueError: Could not connect to Neo4j database. Please ensure that the url is correct, ServiceUnavailable: Cannot to connect to Bolt service on ResolvedIPv6Address(('::1', 7474, 0, 0)) (looks like HTTP), What should I do image-1

what i did is change the bolt port and use that new local host address
you can do that by doing following steps:

  1. Click on the more Option ( 3 dots on rightmost of any database server in Neo4j Desktop)
  2. Click on Settings
  3. Find server.bolt.listen_address
  4. Edit the 7687( default ) to 7690 or something
  5. Save it and run the database server
  6. Also in code do update the new localhost:7690(or whatever you wrote)

@RajSharma1902
Copy link

uri = "bolt://localhost:7687" 
driver = GraphDatabase.driver(uri, auth=("neo4j", "password")) 

also try this as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants