Reputation: 502
I trying to run a docker image of confluent to intiate connect service with Debezium MYSQL connector , but failed to get the loaded class after running the docker.
Docker Command
docker run -d \
--name=kafka-connect \
--net=host \
-e CONNECT_BOOTSTRAP_SERVERS="b-2.<bootstrap_server>.us-east-1.amazonaws.com:9092,b-3.<bootstrap_server>.us-east-1.amazonaws.com:9092,b-1.<bootstrap_server>.us-east-1.amazonaws.com:9092" \
-e CONNECT_REST_PORT=8083 \
-e CONNECT_PLUGIN_PATH="/usr/share/java,/tmp/connectors" \
-e CONNECT_GROUP_ID="quickstart" \
-e CONNECT_CONFIG_STORAGE_TOPIC="quick-config" \
-e CONNECT_OFFSET_STORAGE_TOPIC="quick-offsets" \
-e CONNECT_STATUS_STORAGE_TOPIC="quick-status" \
-e CONNECT_KEY_CONVERTER="org.apache.kafka.connect.json.JsonConverter" \
-e CONNECT_VALUE_CONVERTER="org.apache.kafka.connect.json.JsonConverter" \
-e CONNECT_INTERNAL_KEY_CONVERTER="org.apache.kafka.connect.json.JsonConverter" \
-e CONNECT_INTERNAL_VALUE_CONVERTER="org.apache.kafka.connect.json.JsonConverter" \
-e CONNECT_REST_ADVERTISED_HOST_NAME="ec2-<public_ip>.compute-1.amazonaws.com" \
-v /opt/connectors:/tmp/connectors \
confluentinc/cp-kafka-connect:3.1.2
My Instance directory files used in the volume (-v) is as below:
ubuntu@ip-<hostname>:/opt/connectors$ ls
debezium-connect-jdbc
Below command to test whether Debezium Mysql driver class loaded or not
curl -s http://ec2-<public_ip>.compute-1.amazonaws.com:8083/connector-plugins | jq .
After running the above command I donot see the class for Debezium Mysql connector as mentioned below
io.debezium.connector.mysql.MySqlConnector
Upvotes: 1
Views: 412
Reputation: 4375
Your problem is too old Kafka Connect version: confluentinc/cp-kafka-connect:3.1.2
ships with 0.10.1.1 version, but Classloading Isolation in Connect was implemented only in 0.11.0.
Please use newer images.
Upvotes: 1