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

Reflections library 0.9.12 introduced in 2.5 causes regression scanning for plugins on plugin_path

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5.0, 2.6.0
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      Reflections v0.9.12 was introduced in 2.5 branch to remove Guava dependency - https://issues.apache.org/jira/browse/KAFKA-3061

      This version, however, contains a bug that will cause regression when scanning for plugins if the `plugins_path` specified does not contain valid plugins. The case where we were able to repro this, the `plugins_path` was misconfigured to point to `~/.ssh` which contained unrelated files but no plugins. Further testing is needed to figure out if it will repro for other cases such as empty directory, combination of valid and invalid plugins in directory, just some types of plugins and not others in directory, etc.

      [2020-03-12 18:07:01,045] INFO Loading plugin from: /home/ducker/.ssh (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
      [2020-03-12 18:07:01,047] DEBUG Loading plugin urls: [] (org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader)
      [2020-03-12 18:07:01,062] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectDistributed)
      org.reflections.ReflectionsException: Scanner SubTypesScanner was not configured
              at org.reflections.Store.get(Store.java:39)
              at org.reflections.Store.get(Store.java:61)
              at org.reflections.Store.get(Store.java:46)
              at org.reflections.Store.getAll(Store.java:93)
              at org.reflections.Reflections.getSubTypesOf(Reflections.java:404)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.getPluginDesc(DelegatingClassLoader.java:342)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanPluginPath(DelegatingClassLoader.java:327)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.scanUrlsAndAddPlugins(DelegatingClassLoader.java:260)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.registerPlugin(DelegatingClassLoader.java:252)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initPluginLoader(DelegatingClassLoader.java:221)
              at org.apache.kafka.connect.runtime.isolation.DelegatingClassLoader.initLoaders(DelegatingClassLoader.java:198)
              at org.apache.kafka.connect.runtime.isolation.Plugins.<init>(Plugins.java:60)
              at org.apache.kafka.connect.cli.ConnectDistributed.startConnect(ConnectDistributed.java:91)
              at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:78)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nigel.liang Nigel Liang
                Reporter:
                nigel.liang Nigel Liang
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: