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

ReplicaFetchThread may fail to create due to existing metric

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.2.0
    • 0.11.0.0
    • replication

    Description

      Someone reported the following error.

      java.lang.IllegalArgumentException: A metric named 'MetricName [name=connection-close-rate, group=replica-fetcher-metrics, description=Connections closed per second in the window., tags=

      {broker-id=1, fetcher-id=0}

      ]' already exists, can't register another one.
      at org.apache.kafka.common.metrics.Metrics.registerMetric(Metrics.java:433)
      at org.apache.kafka.common.metrics.Sensor.add(Sensor.java:249)
      at org.apache.kafka.common.metrics.Sensor.add(Sensor.java:234)
      at org.apache.kafka.common.network.Selector$SelectorMetrics.<init>(Selector.java:680)
      at org.apache.kafka.common.network.Selector.<init>(Selector.java:140)
      at kafka.server.ReplicaFetcherThread.<init>(ReplicaFetcherThread.scala:86)
      at kafka.server.ReplicaFetcherManager.createFetcherThread(ReplicaFetcherManager.scala:35)
      at kafka.server.AbstractFetcherManager$$anonfun$addFetcherForPartitions$2.apply(AbstractFetcherManager.scala:83)
      at kafka.server.AbstractFetcherManager$$anonfun$addFetcherForPartitions$2.apply(AbstractFetcherManager.scala:78)
      at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
      at scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
      at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
      at kafka.server.AbstractFetcherManager.addFetcherForPartitions(AbstractFetcherManager.scala:78)
      at kafka.server.ReplicaManager.makeFollowers(ReplicaManager.scala:882)
      at kafka.server.ReplicaManager.becomeLeaderOrFollower(ReplicaManager.scala:700)
      at kafka.server.KafkaApis.handleLeaderAndIsrRequest(KafkaApis.scala:148)
      at kafka.server.KafkaApis.handle(KafkaApis.scala:84)
      at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:62)
      at java.lang.Thread.run(Thread.java:745)

      Attachments

        Issue Links

          Activity

            People

              huxi_2b huxihx
              junrao Jun Rao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: