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

UnwritableMetadataException: Metadata has been lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.7.0
    • None
    • None
    • None
    • Docker Image (bitnami/kafka:3.7.0)
      via Docker Compose

    Description

      Hello,
      First of all: I am new to this Jira and apologize if anything is set or specified incorrectly. Feel free to advise me.

      We currently have an error in our test system, which unfortunately I can't solve, because I couldn't find anything related to it. No solution could be found via the mailing list either.
      The error occurs when we want to start up a node. The node runs using Kraft and is both a controller and a broker. The following error message appears at startup:

      kafka  | [2024-04-16 06:18:13,707] ERROR Encountered fatal fault: Unhandled error initializing new publishers (org.apache.kafka.server.fault.ProcessTerminatingFaultHandler)
      kafka  | org.apache.kafka.image.writer.UnwritableMetadataException: Metadata has been lost because the following could not be represented in metadata version 3.5-IV2: the directory assignment state of one or more replicas
      kafka  |        at org.apache.kafka.image.writer.ImageWriterOptions.handleLoss(ImageWriterOptions.java:94)
      kafka  |        at org.apache.kafka.metadata.PartitionRegistration.toRecord(PartitionRegistration.java:391)
      kafka  |        at org.apache.kafka.image.TopicImage.write(TopicImage.java:71)
      kafka  |        at org.apache.kafka.image.TopicsImage.write(TopicsImage.java:84)
      kafka  |        at org.apache.kafka.image.MetadataImage.write(MetadataImage.java:155)
      kafka  |        at org.apache.kafka.image.loader.MetadataLoader.initializeNewPublishers(MetadataLoader.java:295)
      kafka  |        at org.apache.kafka.image.loader.MetadataLoader.lambda$scheduleInitializeNewPublishers$0(MetadataLoader.java:266)
      kafka  |        at org.apache.kafka.queue.KafkaEventQueue$EventContext.run(KafkaEventQueue.java:127)
      kafka  |        at org.apache.kafka.queue.KafkaEventQueue$EventHandler.handleEvents(KafkaEventQueue.java:210)
      kafka  |        at org.apache.kafka.queue.KafkaEventQueue$EventHandler.run(KafkaEventQueue.java:181)
      kafka  |        at java.base/java.lang.Thread.run(Thread.java:840)
      kafka exited with code 0 

      We use Docker to operate the cluster. The error occurred while we were trying to restart a node. All other nodes in the cluster are still running correctly.
      If you need further information, please let us know. The complete log is attached to this issue.

      Attachments

        1. log.txt
          2.30 MB
          Tobias Bohn

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tobiasbhn Tobias Bohn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: