0

I trying to connect to a Neo4J version 3.5 database hosted by Graphene using .Net client 4.1.6 which uses driver 4.2 in .NET. I am getting this error:

Connection with the server breaks due to IOException: Unexpected end of stream when performing handshake, read returned 0 Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.

A number of things to note:

  1. I am able to connect to the database using an old version of my app (driver 1.7), so I know the database is accessible
  2. I am able to connect to a local copy of my 3.5 database so I know its not a driver compatibility issue
  3. I am able to connect my Neo4J browser remotely to my Graphene hosted database which is another indication that the database is accessible

I am not able to downgrade the version of the driver in my new app. I tried to set Encryption level to EncryptionLevel.Encrypted. Any help as to why this error is occuring would be helpful.

afriedman111
  • 1,925
  • 4
  • 25
  • 42
  • I believe for a 3.5.x db, the 4.0.x driver would work, but maybe not the 4.1.x driver. – InverseFalcon Apr 04 '21 at 15:36
  • The .Net Client implements Driver 1.7 and then jumps to 4.1 so I can't test 4.0 and I can't revert to 1.7. My local connects with 3.5 fine though. – afriedman111 Apr 04 '21 at 16:10
  • Are you sure about that? This should be the github link to the 4.0.3 driver: https://github.com/neo4j/neo4j-dotnet-driver/releases/tag/4.0.3 – InverseFalcon Apr 04 '21 at 16:20
  • If installing via NuGet, there should be a way to specify an older version of the package: https://stackoverflow.com/questions/5628689/download-old-version-of-package-with-nuget – InverseFalcon Apr 04 '21 at 16:27
  • Hi @InverseFalcon, I am using .Net Client and not the .Net Driver directly. The client has .Net Neo4J Driver as a dependency. Client version 4.0.x uses uses Neo4J Driver 4.1 and the next step down, Client version 3.2.x, uses Neo4J Driver 1.7. Also my newer appilcation is developed in .Net Core 3.1 which isn't playing nice with Client Version 3.2 / Driver version 1.7, which is why I can't downgrade. The older client isn't compatible with my application. – afriedman111 Apr 04 '21 at 17:31
  • But like I said, my app connects to a local 3.5 database – afriedman111 Apr 04 '21 at 17:52
  • If you're not able to use the 4.0.x version of the driver, then you should look to migrate Neo4j, at least up to 4.0.x (though 4.1.x is recommended). – InverseFalcon Apr 04 '21 at 21:46
  • This is my hobby site. So my production database is running neo4j 3.5. My older app is connecting using the older version of the .net client. I wish to deploy my newer app and use the same database. I’m trying to avoid a full upgrade of the database so I won’t disrupt service for my users. I was hoping both the old and new site could use the same database, but that doesn’t look possible. Do you have any recommendations? – afriedman111 Apr 04 '21 at 21:52
  • 1
    Nope. Either the Neo4j version or the driver version has to change such that they are using a matched version, or one minor version off from each other. – InverseFalcon Apr 04 '21 at 22:08

0 Answers0