You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2021/11/02 01:37:00 UTC

[jira] [Commented] (KAFKA-13405) Kafka Streams restore-consumer fails to refresh broker IPs after upgrading Kafka cluster

    [ https://issues.apache.org/jira/browse/KAFKA-13405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17437090#comment-17437090 ] 

Matthias J. Sax commented on KAFKA-13405:
-----------------------------------------

I am not 100% sure about the detail how producer and consumer resolve FQDN and what data (ie, resolved IP addressed) they might cache and/or expire/renew. It's not a Kafka Streams issue though for sure, and talking to some colleagues, it seems the clients are not designed the way you expect.

Btw: it could also be an issue with regard to JVM DNS caching: [https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html] – by default, caches entries are kept forever.

In any case, I would recommend to file an "improvement" ticket for the producer and close this ticket as "not a bug" (because it has nothing to do with Kafka Streams).

> Kafka Streams restore-consumer fails to refresh broker IPs after upgrading Kafka cluster
> ----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-13405
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13405
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.8.0, 2.7.1
>            Reporter: Daniel O'Halloran
>            Priority: Critical
>         Attachments: KafkaConfig.txt, KafkaLogs.txt
>
>
> *+Description+*
> After upgrading our Kafka clusters from 2.7 to 2.8 the Streams restore-consumers never update their broker IPs.
> The applications continue to process events as normal, until there is a rebalance.
> Once a rebalance occurs the restore consumers attempts to connect to the old brokers IPs indefinitely and the streams tasks never go back into a RUNNING state.
> We were able to replicate this behaviour with kafka-streams client libraries 2.5.1, 2.7.1 and 2.8.0
>  
> *+Steps to reproduce+*
>  # Upgrade brokers from Kafka 2.7 to Kafka 2.8
>  # Ensure old brokers are completely shut down
>  # Trigger a rebalance of a streams application
>  
> *+Expected result+*
>  * Application rebalances as normal
>  
> *+Actual Result+*
>  * Application cannot restore its data
>  * restore consumer tries to connect to old brokers indefinitely
>  
> *+Observations+*
>  * The cluster metadata was updated on all stream consumer threads during the broker upgrade (multiple times) as the new brokers were brought online (corresponding to leader election occurring on the subscribed partitions), however no cluster metadata was logged on the restore-consumer thread.
>  * None of the original broker IPs are valid/accessible after the upgrade (as expected)
>  * No partition rebalance occurs during the kafka upgrade process.
>  * When the first re-balance was triggered after upgrade, the restore-consumer loops failing to connect on each of the 3 original IPs, but none of the new broker IPs.
>  
> *+Workaround+*
>  * Restart our applications after upgrading our Kafka cluster



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