question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`cub kafka-ready` fails with non-plaintext and config.provider

See original GitHub issue

When a config.providers is specified and connecting with a security.protocol other than PLAINTEXT then cub kafka-ready fails.

When using non-PLAINTEXT, the generated kafka-connect.properties which contains the relevant config.providers properties. The following error is thrown:

[main] ERROR org.apache.kafka.clients.admin.AdminClientConfig - ClassNotFoundException exception occurred: org.ggt.kafka.config.provider.KafkaEnvConfigProvider
[main] ERROR io.confluent.admin.utils.cli.KafkaReadyCommand - Error while running kafka-ready.
org.apache.kafka.common.config.ConfigException: Invalid value java.lang.ClassNotFoundException: org.ggt.kafka.config.provider.KafkaEnvConfigProvider for configuration Invalid config:org.ggt.kafka.config.provider.KafkaEnvConfigProvider ClassNotFoundException exception occurred
	at org.apache.kafka.common.config.AbstractConfig.instantiateConfigProviders(AbstractConfig.java:537)
	at org.apache.kafka.common.config.AbstractConfig.resolveConfigVariables(AbstractConfig.java:477)
	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:107)
	at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:142)
	at org.apache.kafka.clients.admin.AdminClientConfig.<init>(AdminClientConfig.java:208)
	at org.apache.kafka.clients.admin.Admin.create(Admin.java:69)
	at org.apache.kafka.clients.admin.AdminClient.create(AdminClient.java:49)
	at io.confluent.admin.utils.ClusterStatus.isKafkaReady(ClusterStatus.java:138)

Relevant code in the ensure file: https://github.com/confluentinc/cp-docker-images/blob/5.4-preview/debian/kafka-connect-base/include/etc/confluent/docker/ensure#L24-L28

The config provider used works just fine with the strimzi images and works with PLAINTEXT.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
jennybrown8commented, Aug 7, 2020

I seem to also have this issue with a different config provider (AWSSecretProvider from lenses.io). In my case, the cub classpath does not impact the results, but changing CONNECT_SECURITY_PROTOCOL from SASL_SSL to PLAINTEXT does resolve it (even without touching any classpaths). I shouldn’t keep it on plaintext for production use, so I still hope to see a deeper fix for this. I hope this helps to further isolate the problem for fixes.

5reactions
mubeta06commented, Feb 19, 2020

Update: The issue appears to be associated with cub’s inability to load up the config providers jar file. The work around for us was to append to CUB_CLASSPATH the path to the org.ggt.kafka.config.provider.KafkaEnvConfigProvider jar file. e.g. CUB_CLASSPATH=/etc/confluent/docker/docker-utils.jar:/usr/local/share/java/kafka-connect/plugins/kafka-env-config-provider/kafka-env-config-provider-0.0.1.jar

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Docker Kafka Connect] Does not support SASL_PLAINTEXT ...
it's failed at ensure script with `cub kafka-ready 1 40 -z zk-fqdn:2181` with following error : EventThread shut down. Error while running kafka-ready....
Read more >
kafka-connect fails to start when ...
A possible workaround for this issue involves adding the jar of the ConfigProvider in cub CLASSPATH. As per the cub.py code, simply declare ......
Read more >
io.confluent.kafka.security.config.provider ... - Stack Overflow
truststore.password ) in server.properties file and tried re-starting the server and observed the above error. Any help would be appreciated.
Read more >
Docker Developer Guide for Confluent Platform
Docker Developer Guide for Confluent Platform¶. This document assumes knowledge of Docker and Dockerfiles . To review best practices for writing Dockerfiles ...
Read more >
Secret provider on confluent images - Lenses.io Help Center
Secret provider non-plaintext security protocol on confluent docker ... KafkaReadyCommand - Error while running kafka-ready. org.apache.kafka.common.config.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found