Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-21-2022 10:32 AM
Hi,
This is myy first time workign with neo4j. I have a huge graph with 500K nodes and I have to use it in a django application. I'm planning to create a neo4j database and then use neomodel for querying.
For creating the database, I have installed neo4j desktop and created a simple database and started it. Then I installed ptyhon neo4j-driver and tried to query the database. Here is a simple code block I'm using -
driver = GraphDatabase.driver(
"bolt://localhost:7687",
auth=basic_auth("neo4j", "neo4j"))
I have inserted only 1 node in the database for testing. Here is the code I'm using for querying -
with driver.session(database="neo4j") as session:
results = session.read_transaction(
lambda tx: tx.run(cypher_query).data())
for record in results:
print(record)
driver.close()
Whenever I run any query, I get the following error -
ServiceUnavailable: Couldn't connect to localhost:7687 (resolved to ('127.0.0.1:7687',)):
Failed to establish connection to ResolvedIPv4Address(('127.0.0.1', 7687)) (reason [Errno 111] Connection refused)
Everything works fine if I try the same using a neo4j sandbox. Can someone please help me how I get this to work without using sandbox?
Thanks!
02-28-2022 06:59 AM
Hi, this means the local neo4j server cannot be reached. Is it up and running? Can you connect to the neo4j browser at http://localhost:7474/ ?
02-28-2022 10:37 AM
Hi,
Thank you for responding.
I think the problem is due to WSL2 as I have installed neo4j desktop on my windows machine and then I'm accessing the database in a py srcipt that is running on unix via WSL. When I tried the same on another unix machine where both database and py script are running, everything works fine.
02-28-2022 12:26 PM
I see. I'm afraid I cannot help you much with this because I know little about WSL and how it's networking works...
All the sessions of the conference are now available online