Skip to content Skip to sidebar Skip to footer

Python Py2neo Socketerror: Connection Refused

I'm trying to follow along to this neo4j tutorial and I'm having a problem connecting to the API. Here's my traceback: >>> graph.delete_all() Traceback (most recent call

Solution 1:

You don't show your connection code (the Graph constructor) or mention about your setup but the usual causes of this error are (1) the server is not running, (2) the client is connecting to the wrong machine or port or (3) there is a firewall in between client and server, blocking access.

I suggest you try to connect to the server from command line, using cURL or some similar tool, then make sure your Python code attaches to the same location.

Solution 2:

I had this error because I had specified the IP address in the .properties file but I was using localhost to connect. Once I used the IP address in both places it worked.

In /etc/neo4j/neo4j-server.properties

org.neo4j.server.webserver.address=1.2.3.4

API url:

http://neo4j:mypassword@1.2.3.4:7474/db/data/

Post a Comment for "Python Py2neo Socketerror: Connection Refused"