kafka-connect-jdbc : SQLException: No suitable driver only when using distributed mode(kafka-connect-jdbc:SQLException:仅在使用分布式模式时没有合适的驱动程序)
问题描述
我们已经成功地使用了 mySQL - 使用 jdbc 独立连接器的 kafka 数据摄取,但现在面临在分布式模式下使用相同的问题(作为 kafka 连接服务).
We have successfully used mySQL - kafka data ingestion using jdbc standalone connector but now facing issue in using the same in distributed mode (as kafka connect service ).
connect-distributed.properties 文件-
connect-distributed.properties file-
我有我的连接器罐子-
我可以通过这种方式运行脚本来运行独立模式-
I am able to run the standalone mode by running the script in this way-
但是当我尝试调用 REST API 来运行分布式模式连接器时,出现错误:
But when I try to invoke the REST API to run a distributed mode connector , I get the error:
错误-
注意-连接器 jars 放置在所有连接节点上,plugin.path 在所有连接节点上都相同,并且 kafka-connect 服务已启动并运行.
note- connector jars are placed on all connect nodes , plugin.path is same on all connect nodes and kafka-connect service is up and running .
我错过了什么?为什么我无法提交 REST 调用来启动此 mysql 管道的分布式连接工作器/任务?这在独立模式下非常有效.但是在分布式模式下抛出错误.
What am I missing ? Why am I not able to submit REST call to start a distributed connect worker/task for this mysql pipeline ? This works absolutely fine with standalone mode . But throws error with distributed mode .
请帮忙!
谢谢!
推荐答案
通过修复以下问题,问题得到解决 -
By fixing below things, the issue got resolved -
1.修改/usr/share/java/kafka-connect-jdbc/mysql-connector-java-8.0.13.jar的权限为7552.在插件路径中只保留/usr/share/java.
1.Changed permissions of /usr/share/java/kafka-connect-jdbc/mysql-connector-java-8.0.13.jar to 755 2.Keep only /usr/share/java in plugin path.
3.更改我的sql表结构,使其具有一个主键和一个具有增量性质或时间戳的列属性.
3.Change my sql table structure to have one primary key and one column property with incremental nature or timestamp.
这篇关于kafka-connect-jdbc:SQLException:仅在使用分布式模式时没有合适的驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!