-
Notifications
You must be signed in to change notification settings - Fork 204
Chain failure causes on routing table fetching failure #1219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When a routing driver (`neo4j[+s[sc]]` URL scheme), fails to fetch a routing table, is swallows all errors from the connection and RT fetching attempts that lead up to the failure and just reports ``` neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information ``` This hides the relevant information to the user: why did this fail? SSL problems, connectivity issues, unsupported server version, ...? This PR chains all errors (and their causes) as `__cause__` of the top-level `ServiceUnavailable`. When available an `ExceptionGroup` is used (running on Python 3.11+), else all errors are flattened into a single cause chain. ``` | ExceptionGroup: All routing table requests failed (4 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure | s = ssl_context.wrap_socket(s, server_hostname=sni_host) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket | return self.sslsocket_class._create( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 1108, in _create | self.do_handshake() | File "/usr/lib/python3.11/ssl.py", line 1379, in do_handshake | self._sslobj.do_handshake() | ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect | s = cls._connect_secure( | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure | raise BoltSecurityError( | neo4j._exceptions.BoltSecurityError: [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table | new_routing_info = self.fetch_routing_info( | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info | cx = self._acquire(address, auth, deadline, None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire | return connection_creator() | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator | connection = self.opener( | ^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener | return Bolt.open( | ^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open | s, protocol_version = BoltSocket.connect( | ^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect | raise ServiceUnavailable( | neo4j.exceptions.ServiceUnavailable: Couldn't connect to [::1]:7687 (resolved to ('[::1]:7687',)): [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) +---------------- 2 ---------------- | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure | s = ssl_context.wrap_socket(s, server_hostname=sni_host) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket | return self.sslsocket_class._create( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 1108, in _create | self.do_handshake() | File "/usr/lib/python3.11/ssl.py", line 1379, in do_handshake | self._sslobj.do_handshake() | ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1006) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect | s = cls._connect_secure( | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure | raise BoltSecurityError( | neo4j._exceptions.BoltSecurityError: [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table | new_routing_info = self.fetch_routing_info( | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info | cx = self._acquire(address, auth, deadline, None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire | return connection_creator() | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator | connection = self.opener( | ^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener | return Bolt.open( | ^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open | s, protocol_version = BoltSocket.connect( | ^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect | raise ServiceUnavailable( | neo4j.exceptions.ServiceUnavailable: Couldn't connect to 127.0.0.1:7687 (resolved to ('127.0.0.1:7687',)): [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) +---------------- 3 ---------------- | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect | s = cls._connect_secure( | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 415, in _connect_secure | raise ServiceUnavailable( | neo4j.exceptions.ServiceUnavailable: Timed out trying to establish connection to ResolvedIPv4Address(('172.0.0.1', 7687)) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table | new_routing_info = self.fetch_routing_info( | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info | cx = self._acquire(address, auth, deadline, None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire | return connection_creator() | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator | connection = self.opener( | ^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener | return Bolt.open( | ^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open | s, protocol_version = BoltSocket.connect( | ^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect | raise ServiceUnavailable( | neo4j.exceptions.ServiceUnavailable: Couldn't connect to 172.0.0.1:7687 (resolved to ('172.0.0.1:7687',)): Timed out trying to establish connection to ResolvedIPv4Address(('172.0.0.1', 7687)) +---------------- 4 ---------------- | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure | s = ssl_context.wrap_socket(s, server_hostname=sni_host) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 517, in wrap_socket | return self.sslsocket_class._create( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.11/ssl.py", line 1108, in _create | self.do_handshake() | File "/usr/lib/python3.11/ssl.py", line 1379, in do_handshake | self._sslobj.do_handshake() | ConnectionResetError: [Errno 104] Connection reset by peer | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect | s = cls._connect_secure( | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure | raise BoltSecurityError( | neo4j._exceptions.BoltSecurityError: [ConnectionResetError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 104: Connection reset by peer) | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table | new_routing_info = self.fetch_routing_info( | ^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info | cx = self._acquire(address, auth, deadline, None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire | return connection_creator() | ^^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator | connection = self.opener( | ^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener | return Bolt.open( | ^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open | s, protocol_version = BoltSocket.connect( | ^^^^^^^^^^^^^^^^^^^ | File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect | raise ServiceUnavailable( | neo4j.exceptions.ServiceUnavailable: Couldn't connect to 34.78.76.49:7687 (resolved to ('34.78.76.49:7687',)): [ConnectionResetError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 104: Connection reset by peer) +------------------------------------ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/alice/main.py", line 180, in <module> main() File "/home/alice/main.py", line 50, in main driver.verify_connectivity() File "/<neo4j-install-path>/neo4j/_sync/driver.py", line 1054, in verify_connectivity self._get_server_info(session_config) File "/<neo4j-install-path>/neo4j/_sync/driver.py", line 1283, in _get_server_info return session._get_server_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/<neo4j-install-path>/neo4j/_sync/work/session.py", line 173, in _get_server_info self._connect( File "/<neo4j-install-path>/neo4j/_sync/work/session.py", line 126, in _connect super()._connect( File "/<neo4j-install-path>/neo4j/_sync/work/workspace.py", line 160, in _connect target_db = self._get_routing_target_database( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/<neo4j-install-path>/neo4j/_sync/work/workspace.py", line 234, in _get_routing_target_database self._pool.update_routing_table( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 1075, in update_routing_table raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information ``` ``` Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure s = ssl_context.wrap_socket(s, server_hostname=sni_host) File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1100, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect s = cls._connect_secure( File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure raise BoltSecurityError( neo4j._exceptions.BoltSecurityError: [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table new_routing_info = self.fetch_routing_info( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info cx = self._acquire(address, auth, deadline, None) File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire return connection_creator() File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator connection = self.opener( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener return Bolt.open( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open s, protocol_version = BoltSocket.connect( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Couldn't connect to [::1]:7687 (resolved to ('[::1]:7687',)): [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure s = ssl_context.wrap_socket(s, server_hostname=sni_host) File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1100, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect s = cls._connect_secure( File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure raise BoltSecurityError( neo4j._exceptions.BoltSecurityError: [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table new_routing_info = self.fetch_routing_info( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info cx = self._acquire(address, auth, deadline, None) File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire return connection_creator() File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator connection = self.opener( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener return Bolt.open( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open s, protocol_version = BoltSocket.connect( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Couldn't connect to 127.0.0.1:7687 (resolved to ('127.0.0.1:7687',)): [SSLEOFError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 8: Exec format error) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect s = cls._connect_secure( File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 415, in _connect_secure raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Timed out trying to establish connection to ResolvedIPv4Address(('172.0.0.1', 7687)) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table new_routing_info = self.fetch_routing_info( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info cx = self._acquire(address, auth, deadline, None) File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire return connection_creator() File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator connection = self.opener( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener return Bolt.open( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open s, protocol_version = BoltSocket.connect( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Couldn't connect to 172.0.0.1:7687 (resolved to ('172.0.0.1:7687',)): Timed out trying to establish connection to ResolvedIPv4Address(('172.0.0.1', 7687)) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 439, in _connect_secure s = ssl_context.wrap_socket(s, server_hostname=sni_host) File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1100, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1371, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 324, in connect s = cls._connect_secure( File "/<neo4j-install-path>/neo4j/_async_compat/network/_bolt_socket.py", line 441, in _connect_secure raise BoltSecurityError( neo4j._exceptions.BoltSecurityError: [ConnectionResetError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 104: Connection reset by peer) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 832, in fetch_routing_table new_routing_info = self.fetch_routing_info( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 791, in fetch_routing_info cx = self._acquire(address, auth, deadline, None) File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 416, in _acquire return connection_creator() File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 231, in connection_creator connection = self.opener( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 710, in opener return Bolt.open( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt.py", line 364, in open s, protocol_version = BoltSocket.connect( File "/<neo4j-install-path>/neo4j/_sync/io/_bolt_socket.py", line 371, in connect raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Couldn't connect to 34.78.76.49:7687 (resolved to ('34.78.76.49:7687',)): [ConnectionResetError] Connection Failed. Please ensure that your database is listening on the correct host and port and that you have enabled encryption if required. Note that the default encryption setting has changed in Neo4j 4.0. See the docs for more information. Failed to establish encrypted connection. (code 104: Connection reset by peer) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "//home/alice/main.py", line 180, in <module> main() File "//home/alice/main.py", line 50, in main driver.verify_connectivity() File "/<neo4j-install-path>/neo4j/_sync/driver.py", line 1054, in verify_connectivity self._get_server_info(session_config) File "/<neo4j-install-path>/neo4j/_sync/driver.py", line 1283, in _get_server_info return session._get_server_info() File "/<neo4j-install-path>/neo4j/_sync/work/session.py", line 173, in _get_server_info self._connect( File "/<neo4j-install-path>/neo4j/_sync/work/session.py", line 126, in _connect super()._connect( File "/<neo4j-install-path>/neo4j/_sync/work/workspace.py", line 160, in _connect target_db = self._get_routing_target_database( File "/<neo4j-install-path>/neo4j/_sync/work/workspace.py", line 234, in _get_routing_target_database self._pool.update_routing_table( File "/<neo4j-install-path>/neo4j/_sync/io/_pool.py", line 1075, in update_routing_table raise ServiceUnavailable( neo4j.exceptions.ServiceUnavailable: Unable to retrieve routing information ```
588faf2
to
a831901
Compare
StephenCathcart
approved these changes
Jul 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Error
When a routing driver (
neo4j[+s[sc]]
URL scheme), fails to fetch a routing table, is swallows all errors from the connection and RT fetching attempts that lead up to the failure and just reportsThis hides the relevant information to the user: why did this fail? SSL problems, connectivity issues, unsupported server version, ...?
New Erorr
This PR chains all errors (and their causes) as
__cause__
of the top-levelServiceUnavailable
. When available anExceptionGroup
is used (running on Python 3.11+), else all errors are flattened into a single cause chain.Example Output Python 3.11
output
Example Output Python 3.10
output