kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TAO XIAO (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-4129) Processor throw exception when getting channel remote address after closing the channel
Date Tue, 06 Sep 2016 13:06:21 GMT
TAO XIAO created KAFKA-4129:
-------------------------------

             Summary: Processor throw exception when getting channel remote address after
closing the channel
                 Key: KAFKA-4129
                 URL: https://issues.apache.org/jira/browse/KAFKA-4129
             Project: Kafka
          Issue Type: Bug
          Components: core
    Affects Versions: 0.10.0.1
            Reporter: TAO XIAO
            Assignee: TAO XIAO


In Processor {{configureNewConnections()}} catch block, it explicitly closes {{channel}} before
calling {{channel.getRemoteAddress}} which results in {{ClosedChannelException}} being thrown.
This is due to Java implementation that no remote address can be returned after the channel
is closed

{code}
        case NonFatal(e) =>
         // need to close the channel here to avoid a socket leak.
         close(channel)
         error(s"Processor $id closed connection from ${channel.getRemoteAddress}", e)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message