Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4129

Processor throw exception when getting channel remote address after closing the channel

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0.1
    • Fix Version/s: 0.10.1.0
    • Component/s: core
    • Labels:
      None

      Description

      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

              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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xiaotao183 TAO XIAO
                Reporter:
                xiaotao183 TAO XIAO
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: