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

NPE when reloading connector configuration using WorkerConfigTransformer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.2.2, 2.3.1
    • connect
    • None

    Description

      When a connector uses a ConfigProvider and sets a given TTL in the returned ConfigData, it is expected that WorkerConfigTransformer will periodically reload the connector configuration. The problem is that when the TTL expires a NPE is raised. 

      [2019-06-17 14:34:12,320] INFO Scheduling a restart of connector workshop-incremental in 60000 ms (org.apache.kafka.connect.runtime.WorkerConfigTransformer:88)
      [2019-06-17 14:34:12,321] ERROR Uncaught exception in herder work thread, exiting: (org.apache.kafka.connect.runtime.distributed.DistributedHerder:227)
      java.lang.NullPointerException
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder$19.onCompletion(DistributedHerder.java:1187)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder$19.onCompletion(DistributedHerder.java:1183)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder.tick(DistributedHerder.java:273)
      at org.apache.kafka.connect.runtime.distributed.DistributedHerder.run(DistributedHerder.java:219)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:834)

      The reason is that WorkerConfigTransformer is passing a null callback to the herder's restartConnector method.

      Attachments

        Issue Links

          Activity

            People

              rayokota Robert Yokota
              nachomdo Nacho Munoz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: