Graham Campbell created KAFKA-9021:
--------------------------------------

             Summary: Broker shutdown during SSL handshake may be handled as 
handshake failure (Regression)
                 Key: KAFKA-9021
                 URL: https://issues.apache.org/jira/browse/KAFKA-9021
             Project: Kafka
          Issue Type: Bug
          Components: security
    Affects Versions: 2.2.1, 2.1.1, 2.0.1, 2.3.1
            Reporter: Graham Campbell


[Java 11 throws an 
SSLProtocolException|http://hg.openjdk.java.net/jdk/jdk11/file/1ddf9a99e4ad/src/java.base/share/classes/sun/security/ssl/Alert.java#l125]
 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.

 
{code:java}
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)
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to