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

Broker shutdown during SSL handshake may be handled as handshake failure (Regression)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.1, 2.1.1, 2.2.1, 2.3.1
    • Fix Version/s: None
    • Component/s: security
    • Labels:
      None

      Description

      Java 11 throws an SSLProtocolException when a SSL connection is gracefully closed during handshaking instead of an SSLException. This breaks the fix for KAFKA-7168 and the client may process the resulting SSLException as a non-retriable handshake failure rather than a retriable I/O exception.

       

      org.apache.kafka.common.errors.SslAuthenticationException: SSL handshake failed
      Caused by: javax.net.ssl.SSLProtocolException: Received close_notify during handshake
       at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:126)
       at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
       at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
       at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
       at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
       at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:244)
       at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
       at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
       at java.base/sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:672)
       at java.base/sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:627)
       at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:443)
       at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:422)
       at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:634)
       at org.apache.kafka.common.network.SslTransportLayer.handshakeUnwrap(SslTransportLayer.java:474)
       at org.apache.kafka.common.network.SslTransportLayer.doHandshake(SslTransportLayer.java:337)
       at org.apache.kafka.common.network.SslTransportLayer.handshake(SslTransportLayer.java:264)
       at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:125)
       at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:489)
       at org.apache.kafka.common.network.Selector.poll(Selector.java:427)
       at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:510)
       at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:271)
       at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:242)
       at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:233)
       at org.apache.kafka.clients.consumer.KafkaConsumer.position(KafkaConsumer.java:1639)
       at org.apache.kafka.clients.consumer.KafkaConsumer.position(KafkaConsumer.java:1593)
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                gcampbell Graham Campbell
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: