user2004245
user2004245

Reputation: 399

Py2neo Connection Refused Only with Cypher Execute

I'm running py2neo 2.0.4 on a remote Neo4j 2.1.6 database. I'm able to connect to the database with some commands, but not with all.

Using the same connection uri for both instances:

This works fine.

test = self.graph_db.find_one('Node')

This does not.

test = self.graph_db.cypher.execute('MATCH (n) RETURN n LIMIT 1')

Regardless of the actual contents of the query, I get the same connection refused results.

Upvotes: 0

Views: 154

Answers (1)

user2004245
user2004245

Reputation: 399

With the help of my service provider for Neo4j, we were able to determine the error and a fix.

This is a known flaw in pre-2.2 Neo4j. To resolve this error, use the py2neo rewrite function.

py2neo.rewrite(('http', '0.0.0.0', 7474, ('https', {host}, {port}))

Upvotes: 2

Related Questions