cp-docker-images
cp-docker-images copied to clipboard
Kafka Connect - Adding CONNECT_PLUGIN_PATH in docker-compose.yml makes container crash
Running kafka-connect version 5.0.1 in Docker using docker-compose on macOS High Sierra.
When I was missing the CONNECT_PLUGIN_PATH in my yml-file, kafka connect started up as it should, I could curl the connectors endpoint and get an emtpy array as response.
However, when trying to register a jdbc connector, I got (as expected) an error 500 with the message Failed to find any class that implements Connector and which name matches io.confluent.connect.jdbc.JdbcSinkConnector
So, I added in the CONNECT_PLUGIN_PATH. Now, kafka connects starts up, producing lots of log output warnings, and then just dies. No error in the log output or anything. The container just stops.
Removing the CONNECT_PLUGIN_PATH again, and docker-compose up again, and we're back to square one with the endpoint responding etc.
I have tried with all sorts of combinations for the value of the path. The latest one being CONNECT_PLUGIN_PATH: "/usr/share/java/,/etc/kafka-connect/jars"
What am I missing?
It has been working fine for me (and others)...
CONNECT_PLUGIN_PATH: /usr/share/java,/etc/kafka-connect/uber/,/etc/kafka-connect/plugins
My host directory structure - https://github.com/cricket007/kafka-connect-sandbox/tree/master/kafka-connect
This is a late message, but you might need to remove the quotes in your configuration, i.e.
CONNECT_PLUGIN_PATH: /usr/share/java/,/etc/kafka-connect/jars
instead of CONNECT_PLUGIN_PATH: "/usr/share/java/,/etc/kafka-connect/jars"
.
The container error log will also indicate something to the effect of 'cannot find JdbcSinkConnector
in the classpaths "/usr/share/java"
... etc - when it should be /usr/share/java
.
Notes: I've verified this using this docker image confluentinc/cp-kafka-connect:latest
, and my docker compose version is 3.3
.
Thanks @kevvo83, fixed my problem