Skip to content

(Bolt) Use of ServiceUnavailableException in TLS-enabled channel #302

@nandosola

Description

@nandosola

Hi,

I'm trying to debug a potential issue in neo4j-ogm that might be related to Bolt session handling after a server restart (see also: spring-projects/spring-data-neo4j#373). Before going any further, I have a doubt concerning the Java Driver:

  • For plaintext connections, the first operation after the restart results in a ServiceUnavailableException with the following message:

    "Connection terminated while receiving data. This can happen due to network instabilities, or due to restarts of the database."

  • For TLS-enabled connections, the first operation after the restart results in a ClientException with exactly the same message.

My question is, why are there two different exceptions instead of just using ServiceUnavailableException for both?


Just FYI, neo4j-ogm doesn't handle ServiceUnavailableException yet. It just wraps ClientExceptions coming from server disconnections or network glitches in CypherException, so the library user has to catch them and reconnect manually, invoking a new query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions