什么会导致这个 debezium kafka 连接器错误?

what would cause this debezium kafka connector error?

我正在寻找连接 mysql --> debezium --> kafka(融合云)。我想知道是否有人可以帮助我解决这个错误消息:

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

我的 kafka worker 文件中有 debezium 的 jar 文件:

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

插件文件夹内容如下:

-antlr4-运行time-4.7.2.jar

-debezium-api-1.5.3.Final.jar

-debezium-连接器-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-连接器-java-8.0.21.jar

当我启动分发器时,我看到添加了插件:

[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}

但是,当我 运行 我的 curl 命令时:

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

我收到错误:

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

知道我可能遗漏了什么吗?

谢谢,

您需要将debezium mysql connector的所有jar文件放在一个目录

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

而不是刚好低于

/home/ec2-user/kafka/plugins

可以使用curl命令

curl -X GET http://localhost:8083/connector-plugins

查看正确安装了哪些插件。如果此处未列出 debezium,则表示安装存在问题。您可能需要检查文件权限。