Search code examples
apache-kafka-connectdebezium

what would cause this debezium kafka connector error?


I'm looking to connect mysql --> debezium --> kafka (confluent cloud). I was wondering if someone can help me with this error msg:

Failed to find any class that implements Connector and which name matches io.debezium.connector.mysql.MySqlConnector.

I have the jar files for debezium in my kafka worker's file:

plugin.path=/home/ec2-user/kafka/plugins

The content of the plugin folder has the following:

-antlr4-runtime-4.7.2.jar

-debezium-api-1.5.3.Final.jar

-debezium-connector-mysql-1.5.3.Final.jar

-debezium-core-1.5.3.Final.jar

-debezium-ddl-parser-1.5.3.Final.jar

-failureaccess-1.0.1.jar

-guava-30.0-jre.jar

-mysql-binlog-connector-java-0.25.1.jar

-mysql-connector-java-8.0.21.jar

when I started up the distributor, I see that the plugins are added:

[2021-06-24 23:01:54,680] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/debezium-api-1.5.3.Final.jar}
[2021-06-24 23:01:54,684] INFO Loading plugin from: /home/ec2-user/kafka/plugins/debezium-connector-mysql-1.5.3.Final.jar
[2021-06-24 23:01:54,744] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/debezium-connector-mysql-
[2021-06-24 23:01:54,745] INFO Added plugin 'io.debezium.connector.mysql.transforms.ReadToInsertEvent'
[2021-06-24 23:01:54,745] INFO Loading plugin from: /home/ec2-user/kafka/plugins/debezium-core-1.5.3.Final.jar
[2021-06-24 23:01:54,866] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/debezium-core-1.5.3.Final.jar} 
[2021-06-24 23:01:54,867] INFO Added plugin 'io.debezium.converters.CloudEventsConverter'
[2021-06-24 23:01:54,871] INFO Added plugin 'io.debezium.transforms.outbox.EventRouter'
[2021-06-24 23:01:54,872] INFO Added plugin 'io.debezium.transforms.ExtractNewRecordState'
[2021-06-24 23:01:54,872] INFO Added plugin 'io.debezium.transforms.ByLogicalTableRouter'
[2021-06-24 23:01:54,873] INFO Added plugin 'io.debezium.transforms.tracing.ActivateTracingSpan'
[2021-06-24 23:01:54,873] INFO Loading plugin from: /home/ec2-user/kafka/plugins/debezium-ddl-parser-1.5.3.Final.jar
[2021-06-24 23:01:55,060] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/debezium-ddl-parser-1.5.3.Final.jar}
[2021-06-24 23:01:55,061] INFO Loading plugin from: /home/ec2-user/kafka/plugins/failureaccess-1.0.1.jar
[2021-06-24 23:01:55,069] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/failureaccess-1.0.1.jar}
[2021-06-24 23:01:55,070] INFO Loading plugin from: /home/ec2-user/kafka/plugins/guava-30.0-jre.jar
[2021-06-24 23:01:55,307] INFO Registered loader: PluginClassLoader{pluginLocation=file:/home/ec2-user/kafka/plugins/guava-30.0-jre.jar}

However, when I run my curl command:

curl -s -X POST -H 'Content-Type: application/json' --data @debe-connector.json http://localhost:8083/connectors -v

I get the error:

Failed to find any class that implements Connector and which name matches io.debezium.connector.mysql.MySqlConnector.

Any idea what I might be missing?

Thanks,


Solution

  • You need to put all the jar files of the debezium mysql connector inside a directory

    /home/ec2-user/kafka/plugins/debezium-connector-mysql

    instead of just under

    /home/ec2-user/kafka/plugins