You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "TAO XIAO (JIRA)" <ji...@apache.org> on 2016/09/06 13:22:20 UTC

[jira] [Updated] (KAFKA-4129) Processor throw exception when getting channel remote address after closing the channel

     [ https://issues.apache.org/jira/browse/KAFKA-4129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

TAO XIAO updated KAFKA-4129:
----------------------------
    Status: Patch Available  (was: Open)

> 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)