Failed to send SSL Close message
Asked Answered
E

0

12

I have a thread which once in a while is going to list the topics on the Message Hub. But once in a while, I am getting a :Failed to send SSL Close message.

Any ideas?

KafkaConsumer<String, String> consumer = new KafkaConsumer<>(getConsumerConfiguration());
try {
    Map<String, List<PartitionInfo>> topics = consumer.listTopics();
    return new ArrayList<String>(topics.keySet());
} finally {
    if (consumer != null) {
        **consumer.close();**
    }
}

I am getting the warning from consumer.close.

The configuration of the consumer:

  • sasl.mechanism = PLAIN
  • security.protocol = SASL_SSL
  • group.id = consumer1
  • ssl.enabled.protocol = TLSv1.2
  • ssl.endpoint.identification.algorithm = HTTPS
  • ssl.protocol = TLSv1.2
  • sasl.jaas.config = org.apache.kafka.common.security.plain.PlainLoginModule required username="USERNAME" password="PASSWORD";

[WARN ] 2018-01-25 20:12:23.204 [ClusterChannelMonitorTaskThread] org.apache.kafka.common.network.SslTransportLayer {} - Failed to send SSL Close message java.io.IOException: Unexpected status returned by SSLEngine.wrap, expected CLOSED, received OK. Will not send close message to peer. at org.apache.kafka.common.network.SslTransportLayer.close(SslTransportLayer.java:158) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.utils.Utils.closeAll(Utils.java:663) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.network.KafkaChannel.close(KafkaChannel.java:59) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.network.Selector.doClose(Selector.java:582) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.network.Selector.close(Selector.java:573) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.network.Selector.close(Selector.java:539) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.common.network.Selector.close(Selector.java:250) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.NetworkClient.close(NetworkClient.java:505) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.close(ConsumerNetworkClient.java:439) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.ClientUtils.closeQuietly(ClientUtils.java:71) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1613) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1573) [kafka-clients-0.11.0.0.jar:?] at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1549) [kafka-clients-0.11.0.0.jar:?] at com.ibm.saas.msg.kafka.KafkaMessageService.listChannelNames(KafkaMessageService.java:305) [saas-msg-kafka-TRUNK-SNAPSHOT.jar:TRUNK-SNAPSHOT]

Emboly answered 26/1, 2018 at 1:35 Comment(3)
Looks like a bug in Kafka. The SSLEngine is a pretty difficult thing to drive correctly.Zrike
Filed a issue on Kafka: issues.apache.org/jira/browse/KAFKA-6510Emboly
The discussion there and at the other issue you linked doesn’t give much hope. They certainly didn’t understand the issue when the code was written.Zrike

© 2022 - 2024 — McMap. All rights reserved.