[
https://issues.apache.org/jira/browse/CAMEL-9739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15206239#comment-15206239
]
Claus Ibsen commented on CAMEL-9739:
------------------------------------
And this as well. And then change the INFO logging to DEBUG so its not noisy.
> Mina2Consumer exception handler do close session also for IOException
> ---------------------------------------------------------------------
>
> Key: CAMEL-9739
> URL: https://issues.apache.org/jira/browse/CAMEL-9739
> Project: Camel
> Issue Type: Bug
> Components: camel-mina2
> Affects Versions: 2.16.2
> Reporter: Thomas Papke
> Assignee: Andrea Cosentino
> Fix For: 2.15.6, 2.16.3, 2.18.0, 2.17.1
>
> Attachments: IoException.patch
>
>
> The camel-mina2 consumer Exception handler
> ({{org.apache.camel.component.mina2.Mina2Consumer.ReceiveHandler.exceptionCaught(IoSession,
> Throwable)}}
> Is an implementation of the Mina2 interface
> {{org.apache.mina.core.service.IoHandler}}. The Javadoc Mina2 documentation
> of exceptionCaught explicitly mention, that Mina2 will close the connection
> for all IOExceptions automatically. But camel-mina2 seems to close the
> connection for any kind of exception.
> *Current behavior:* If an error occurs on the transport layer (e.g. secure
> TCP connection where the certificate was not trusted and a SSLException
> occure), I saw the following warning:
> {code}
> org.apache.camel.component.mina2.Mina2Consumer#exceptionCaught(376) - Closing
> session as an exception was thrown from MINA
> {code}
> And also an error from mina2:
> {code}
> org.apache.mina.filter.ssl.SslHandler#destroy(210) - Unexpected exception
> from SSLEngine.closeInbound().
> " javax.net.ssl.SSLException: Inbound closed before receiving peer's
> close_notify: possible truncation attack?
> {code}
> From a functional perspective, beside the annoying log entries, it looks like
> the SSL error details are sometime not send properly back to the client.
> *Current workaround:* I don’t have one.
> *Suggested bugfix:* Implement the Mina2Consumer exception handling similar to
> {{org.apache.mina.handler.stream.StreamIoHandler.exceptionCaught(IoSession,
> Throwable)}} and do not handle IoException and simply rethrow them. E.g.
> {code}
> if (cause instanceof IOException) {
> LOG.info("IOException will be closed by Mina itself")
> return;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)