Unexpected connection driver exception
Error
Customers may encounter the following error message when attempting to connect to the RabbitMQ server.
"Unexpected connection driver exception"
Example Log:
Unexpected connection driver exception for connection amqp://Qe1***[email protected]:5671//unifiedfeed/23793
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
Applies to
UOF SDK Java
Symptoms
In the SDK execution logs, we can observe log entries: Unexpected connection driver exception. This is quite common error type during reconnection attempts and it is usually resolved by itself within 1 minute or so.
The SDK relies on the RabbitMQ client library for communication with the RabbitMQ server. This error typically is first instance of defense when identifying and recovering a lost connection with the RabbitMQ server. In other words, the RabbitMQ client often throws the "Unexpected connection driver exception" when the connection is lost. There are various ways the RabbitMQ client represents such failures and recoveries in the logs in terms of message ordering.
One scenario is where the RabbitMQ does not immediately notify about the failure and throws an exception indicating a lost connection only after the connection is reestablished. This may result in the "Unexpected connection driver exception" occurring minutes later, after messages stop flowing through the SDK. In this case, the SDK identifies a lack of communication with the server at the application level and triggers an Alive Violation before the RabbitMQ client notifies about the lost connection. As a result, the producer is initially marked as DOWN due to AliveViolation (which may later be changed to ConnectionDown).
In another scenario, the RabbitMQ client promptly throws the exception upon detecting a lost connection, leading to the producer being marked as DOWN due to ConnectionDown. This status may later transition to AliveViolation if the connection does not recover immediately.
Causes
Driver/Library Issues: The driver/library used to connect to RabbitMQ may encounter unexpected conditions or errors due to bugs, misconfigurations, or incompatibility issues. The issue could stem from an incompatible version of the RabbitMQ library with the server. The SDK is rigorously tested with the RabbitMQ library it was initially shipped with. Therefore, using other versions of the RabbitMQ library may result in this or other issues.
Network Problems: Connectivity issues, DNS resolution failures, or firewall restrictions can lead to such exceptions.
Resource Limitations: Server resource constraints (such as memory or file descriptors) being reached can sometimes manifest as connection issues.
Resolution
Upgrade SDK: Update to a version 2.0.53 or later, preferably version v3.x which uses much more contemporary rabbit library. The SDK versions v3.x are using rabbitMQ which is 3 major releases newer than the previous one. it is strongly recommended to be upgrade to v3.x version of the SDK. If the issue persists, try restarting the SDK.
Network Diagnostics: Perform network diagnostics (like pinging the server, checking open ports, etc.) to ensure that there are no network-related issues.
Last updated
Was this helpful?