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

Kafka Streams restore-consumer fails to refresh broker IPs after upgrading Kafka cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Not A Bug
    • 2.8.0, 2.7.1
    • None
    • streams
    • None

    Description

      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

      1. Upgrade brokers from Kafka 2.7 to Kafka 2.8
      2. Ensure old brokers are completely shut down
      3. 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

      Attachments

        1. KafkaConfig.txt
          10 kB
          Daniel O'Halloran
        2. KafkaLogs.txt
          16 kB
          Daniel O'Halloran

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dohalloran Daniel O'Halloran
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: