<bdo id='Nib8m'></bdo><ul id='Nib8m'></ul>

      <small id='Nib8m'></small><noframes id='Nib8m'>

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

      1. <legend id='Nib8m'><style id='Nib8m'><dir id='Nib8m'><q id='Nib8m'></q></dir></style></legend>

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

        时间:2023-08-22

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

              <legend id='6Psjq'><style id='6Psjq'><dir id='6Psjq'><q id='6Psjq'></q></dir></style></legend>

              1. <tfoot id='6Psjq'></tfoot>

                <small id='6Psjq'></small><noframes id='6Psjq'>

                  <bdo id='6Psjq'></bdo><ul id='6Psjq'></ul>
                    <tbody id='6Psjq'></tbody>

                • 本文介绍了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模板网!

                  上一篇:kafka-connect-jdbc:SQLException:仅在使用分布式模式时没 下一篇:为什么 Kafka jdbc 将插入数据作为 BLOB 而不是 var

                  相关文章

                  最新文章

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

                      <legend id='tmqPB'><style id='tmqPB'><dir id='tmqPB'><q id='tmqPB'></q></dir></style></legend>
                        <bdo id='tmqPB'></bdo><ul id='tmqPB'></ul>

                      <small id='tmqPB'></small><noframes id='tmqPB'>

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