OPENDJ-2327: Improve log messages on certain 'server error' disconnects
Some of these disconnects are seen in the wild more often than the error reporting would suggest was originally expected.
This change adds some better logging when they occur to give users a much clearer idea of where they came from.
With this in place we will be able to audit log files in the future to narrow down if there are any particularly common for exceptions thrown in one of these places. In some cases it might then be worth refining the error messages for those scenarios to make them more user friendly.
| | |
| | | statTracker.updateMessageWritten(message); |
| | | } |
| | | } |
| | | catch (ClosedChannelException e) |
| | | { |
| | | logger.traceException(e); |
| | | disconnect(DisconnectReason.IO_ERROR, false, |
| | | ERR_IO_ERROR_ON_CLIENT_CONNECTION.get(getExceptionMessage(e))); |
| | | return; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | logger.traceException(e); |
| | | |
| | | // FIXME -- Log a message or something |
| | | disconnect(DisconnectReason.SERVER_ERROR, false, null); |
| | | disconnect(DisconnectReason.SERVER_ERROR, false, |
| | | ERR_UNEXPECTED_EXCEPTION_ON_CLIENT_CONNECTION.get(getExceptionMessage(e))); |
| | | return; |
| | | } |
| | | finally |
| | |
| | | { |
| | | clientConnection = (LDAPClientConnection) key.attachment(); |
| | | |
| | | try |
| | | int readResult = clientConnection.processDataRead(); |
| | | if (readResult < 0) |
| | | { |
| | | int readResult = clientConnection.processDataRead(); |
| | | if (readResult < 0) |
| | | { |
| | | key.cancel(); |
| | | } |
| | | if (readResult > 0) { |
| | | readyConnections.add(clientConnection); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | logger.traceException(e); |
| | | |
| | | // Some other error occurred while we were trying to read data |
| | | // from the client. |
| | | // FIXME -- Should we log this? |
| | | key.cancel(); |
| | | clientConnection.disconnect(DisconnectReason.SERVER_ERROR, |
| | | false, null); |
| | | } |
| | | if (readResult > 0) { |
| | | readyConnections.add(clientConnection); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | |
| | | |
| | | if (clientConnection != null) |
| | | { |
| | | clientConnection.disconnect(DisconnectReason.SERVER_ERROR, |
| | | false, null); |
| | | clientConnection.disconnect(DisconnectReason.SERVER_ERROR, false, |
| | | ERR_UNEXPECTED_EXCEPTION_ON_CLIENT_CONNECTION.get(getExceptionMessage(e))); |
| | | } |
| | | } |
| | | } |
| | |
| | | INFO_DISABLE_CONNECTION_1528=Disabling %s |
| | | ERR_INITIALIZE_HTTP_CONNECTION_HANDLER_1529=Failed to initialize Http Connection Handler |
| | | ERR_TRANSACTION_ID_CONTROL_HAS_NO_VALUE_1530=No value was provided for the transaction \ |
| | | id control, whereas an UTF-8 encoded value is expected |
| | | id control, whereas an UTF-8 encoded value is expected |
| | | ERR_UNEXPECTED_EXCEPTION_ON_CLIENT_CONNECTION_1531=Exception on the underlying client connection: %s |
| | | ERR_IO_ERROR_ON_CLIENT_CONNECTION_1532=The underlying client connection timed out or closed: %s |