問題描述
我們已經成功地使用了 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:僅在使用分布式模式時沒有合適的驅動程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!