<i id='ur2Mh'><tr id='ur2Mh'><dt id='ur2Mh'><q id='ur2Mh'><span id='ur2Mh'><b id='ur2Mh'><form id='ur2Mh'><ins id='ur2Mh'></ins><ul id='ur2Mh'></ul><sub id='ur2Mh'></sub></form><legend id='ur2Mh'></legend><bdo id='ur2Mh'><pre id='ur2Mh'><center id='ur2Mh'></center></pre></bdo></b><th id='ur2Mh'></th></span></q></dt></tr></i><div id='ur2Mh'><tfoot id='ur2Mh'></tfoot><dl id='ur2Mh'><fieldset id='ur2Mh'></fieldset></dl></div>
      <legend id='ur2Mh'><style id='ur2Mh'><dir id='ur2Mh'><q id='ur2Mh'></q></dir></style></legend>
          <bdo id='ur2Mh'></bdo><ul id='ur2Mh'></ul>

        <tfoot id='ur2Mh'></tfoot>
      1. <small id='ur2Mh'></small><noframes id='ur2Mh'>

      2. kafka-connect-jdbc:SQLException:仅在使用分布式模式时没

        时间:2023-08-22

      3. <small id='5POm8'></small><noframes id='5POm8'>

          <tbody id='5POm8'></tbody>
      4. <tfoot id='5POm8'></tfoot>

            <i id='5POm8'><tr id='5POm8'><dt id='5POm8'><q id='5POm8'><span id='5POm8'><b id='5POm8'><form id='5POm8'><ins id='5POm8'></ins><ul id='5POm8'></ul><sub id='5POm8'></sub></form><legend id='5POm8'></legend><bdo id='5POm8'><pre id='5POm8'><center id='5POm8'></center></pre></bdo></b><th id='5POm8'></th></span></q></dt></tr></i><div id='5POm8'><tfoot id='5POm8'></tfoot><dl id='5POm8'><fieldset id='5POm8'></fieldset></dl></div>

            <legend id='5POm8'><style id='5POm8'><dir id='5POm8'><q id='5POm8'></q></dir></style></legend>

              • <bdo id='5POm8'></bdo><ul id='5POm8'></ul>
                • 本文介绍了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-

                  bootstrap.servers=IP1:9092,IP2:9092
                  group.id=connect-cluster
                  key.converter.schemas.enable=true
                  value.converter.schemas.enable=true
                  offset.storage.topic=connect-offsets
                  offset.storage.replication.factor=2
                  config.storage.topic=connect-configs
                  config.storage.replication.factor=2
                  status.storage.topic=connect-status
                  status.storage.replication.factor=2
                  offset.flush.interval.ms=10000
                  plugin.path=/usr/share/java,/usr/share/java/kafka-connect-jdbc
                  

                  我有我的连接器罐子-

                  /usr/share/java/kafka-connect-jdbc
                  
                  -rw-r--r-- 1 root root  906708 Jul 29 01:18 zookeeper-3.4.13.jar
                  -rw-r--r-- 1 root root   74798 Jul 29 01:18 zkclient-0.10.jar
                  -rw-r--r-- 1 root root 5575351 Jul 29 01:18 sqlite-jdbc-3.8.11.2.jar
                  -rw-r--r-- 1 root root   41203 Jul 29 01:18 slf4j-api-1.7.25.jar
                  -rw-r--r-- 1 root root  658466 Jul 29 01:18 postgresql-9.4-1206-jdbc41.jar
                  -rw-r--r-- 1 root root 1292696 Jul 29 01:18 netty-3.10.6.Final.jar
                  -rw-r--r-- 1 root root  489884 Jul 29 01:18 log4j-1.2.17.jar
                  -rw-r--r-- 1 root root  211219 Jul 29 01:18 kafka-connect-jdbc-5.0.0.jar
                  -rw-r--r-- 1 root root  317816 Jul 29 01:18 jtds-1.3.1.jar
                  -rw-r--r-- 1 root root   87325 Jul 29 01:18 jline-0.9.94.jar
                  -rw-r--r-- 1 root root   20844 Jul 29 01:18 common-utils-5.0.0.jar
                  -rw-r--r-- 1 root root   20437 Jul 29 01:18 audience-annotations-0.5.0.jar
                  -rw-r----- 1 root root 2132635 Nov 11 16:31 mysql-connector-java-8.0.13.jar
                  

                  我可以通过这种方式运行脚本来运行独立模式-

                  I am able to run the standalone mode by running the script in this way-

                  /usr/bin/connect-standalone /etc/kafka/connect-standalone.properties /etc/kafka-connect-jdbc/source-quickstart-mysql.properties
                  

                  但是当我尝试调用 REST API 来运行分布式模式连接器时,出现错误:

                  But when I try to invoke the REST API to run a distributed mode connector , I get the error:

                  curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" X.X.X.X:8083/connectors/ -d '{"name": "linuxemp-connector", "config": { "connector.class": "io.confluent.connect.jdbc.JdbcSourceConnector", "tasks.max": "1", "connection.url": "jdbc:mysql://Y.Y.Y.Y:3306/linux_db?user=groot&password=pwd","table.whitelist": "emp","mode": "timestamp","incrementing.column.name":"empid","topic.prefix": "mysqlconnector-" } }'
                  

                  错误-

                  {"error_code":400,"message":"Connector configuration is invalid and contains the following 2 error(s):\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://Y.Y.Y.Y:3306/linux_db?user=groot&password=pwd for configuration Couldn't open connection to jdbc:mysql://Y.Y.Y.Y:3306/linux_db?user=groot&password=pwd\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://Y.Y.Y.Y:3306/linux_db?user=groot&password=pwd for configuration Couldn't open connection to jdbc:mysql://Y.Y.Y.Y:3306/linux_db?user=groot&password=pwd\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"}
                  

                  注意-连接器 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模板网!

                  上一篇:在 Debezium Mysql Connector 中将更多表列入白名单的有 下一篇:kafka-connect-jdbc:SQLException:仅在使用分布式模式时没

                  相关文章

                  最新文章

                  <i id='IxTWP'><tr id='IxTWP'><dt id='IxTWP'><q id='IxTWP'><span id='IxTWP'><b id='IxTWP'><form id='IxTWP'><ins id='IxTWP'></ins><ul id='IxTWP'></ul><sub id='IxTWP'></sub></form><legend id='IxTWP'></legend><bdo id='IxTWP'><pre id='IxTWP'><center id='IxTWP'></center></pre></bdo></b><th id='IxTWP'></th></span></q></dt></tr></i><div id='IxTWP'><tfoot id='IxTWP'></tfoot><dl id='IxTWP'><fieldset id='IxTWP'></fieldset></dl></div>
                    <bdo id='IxTWP'></bdo><ul id='IxTWP'></ul>

                  <legend id='IxTWP'><style id='IxTWP'><dir id='IxTWP'><q id='IxTWP'></q></dir></style></legend>
                • <small id='IxTWP'></small><noframes id='IxTWP'>

                    1. <tfoot id='IxTWP'></tfoot>