Home > database >  org.neo4j.driver.exceptions.ClientException: The server does not support any of the protocol version
org.neo4j.driver.exceptions.ClientException: The server does not support any of the protocol version

Time:10-19

I am using neo4j-connector-apache-spark_2.11-4.0.2_for_spark_2.4.jar this connector with spark version 2.4.4, scala 2.11.12 and neo4j 3.3.x

Throwing this org.neo4j.driver.exceptions.ClientException: The server does not support any of the protocol versions supported by this driver. Ensure that you are using driver and server versions that are compatible with one another, while trying to read data from neo4j.

CodePudding user response:

TL;DR This error means that the underlying Neo4j driver is either very old (unlikely) or too recent (most likely) for the target Neo4j server. You should either downgrade the Neo4j driver (and hope it is still compatible with the Spark connector) or upgrade the 3.3 server to 4.4 or 5.x (since 3.3 has reached EOL in 2019).

Long version Neo4j drivers negotiate a Bolt protocol version with the server after establishing a connection. Drivers have a limited range of versions they can offer, so older protocol versions are excluded from newer driver releases. The server also offers a range of protocol versions it can support. The server then selects a version from the overlap of all these versions.

Since Neo4j server 3.3 has reached end of life in 2019 (see https://neo4j.com/developer/kb/neo4j-supported-versions/), the associated Bolt protocol version (1, according to the docs) has not been included in any recent drivers' negotiated version range.

Because of this, there is no overlap so no protocol version can be picked up and this error happens, reported back by the Java driver as a ClientException.

  • Related