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

Kafka connect task sometimes fails on start-up

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      We use kafka connect for indexing into Elasticsearch. Sometimes when we updating our kafka-connect application one or several tasks get FAILED status. Restarting connector with failed task usually helps.

       

      Below is an example of the failed task's stacktrace:

      java.lang.IllegalArgumentException: A metric named 'MetricName [name=offset-commit-max-time-ms, group=connector-task-metrics, description=The maximum time in milliseconds taken by this task to commit offsets., tags={connector=prom-ua-catalog-product, task=2}]' already exists, can't register another one.
          at org.apache.kafka.common.metrics.Metrics.registerMetric(Metrics.java:532)
          at org.apache.kafka.common.metrics.Sensor.add(Sensor.java:256)
          at org.apache.kafka.common.metrics.Sensor.add(Sensor.java:241)
          at org.apache.kafka.connect.runtime.WorkerTask$TaskMetricsGroup.<init>(WorkerTask.java:328)
          at org.apache.kafka.connect.runtime.WorkerTask.<init>(WorkerTask.java:69)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.<init>(WorkerSinkTask.java:98)
          at org.apache.kafka.connect.runtime.Worker.buildWorkerTask(Worker.java:449)
          at org.apache.kafka.connect.runtime.Worker.startTask(Worker.java:404)
          at org.apache.kafka.connect.runtime.distributed.DistributedHerder.startTask(DistributedHerder.java:852)
          at org.apache.kafka.connect.runtime.distributed.DistributedHerder.access$1600(DistributedHerder.java:108)
          at org.apache.kafka.connect.runtime.distributed.DistributedHerder$13.call(DistributedHerder.java:866)
          at org.apache.kafka.connect.runtime.distributed.DistributedHerder$13.call(DistributedHerder.java:862)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                anti-social Alexander Koval
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: