neo4j-labs / neo4rs

Neo4j driver for rust

Home Page:https://docs.rs/neo4rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't connect to an AuraDB instance

ostnam opened this issue · comments

Hi,

I'm trying to connect to an AuraDB instance. I get different errors depending on the URI that I use:

  • Using the default URI, that starts with "neo4j+s//", I get an IOError: "invalid port value".
  • After appending ":7687" to the URI, I get a different IOError: "failed to lookup address information: Name or service not known".
  • If I remove "neo4j+s//", I get another IOError: "early eof".
  • If I also remove the port from the URI, I get a fourth IOError: "invalid socket address".

Is AuraDB currently supported by neo4rs? If so, how to connect to an AuraDB instance? I can connect to the same instance using cypher-shell, at port 7687 🤔

Hi @ostnam,

currently this driver does not support encrypted connections. All connection attempts are made with the implicit bolt:// scheme.

When you try to connect to neo4j+s://<id>.databases.neo4j.io:7687, it's like you would actually connect to bolt://neo4j+s://<id>.databases.neo4j.io:7687 so the neo4j+s part is parsed as hostname/address, hence the "failed to lookup address information".
Removing the neo4j+s:// would be the correct URI form, but it gives you the EOF error because we send an unencrypted message over a connection that tries to initiate the encryption first.

Unfortunately, since AuraDB is only available with encrypted connections, you cannot use this driver until we support encrypted connections. I opened a new issue to track this (#81). There is also the question of accepting URIs with a different scheme than bolt, before we can support AuraDB.

It looks like cypher shell 5+ has gone closed source, but the 4.x repo may be helpful neo4j+s.

Nevermind the go or other official driver is a better resource.

This works now. Starting in 0.6.2

I'm gonna close this issue for now since it's working now. If anything comes up, please open a new issue.