简体   繁体   English

Confluent JDBC Source 连接器的问题

[英]Issue with Confluent JDBC Source connector

I'm getting the below issue while trying to use the confluent for kafka-connect.我在尝试将融合用于 kafka-connect 时遇到以下问题。 I'm trying to follow the demo given at https://www.confluent.io/blog/simplest-useful-kafka-connect-data-pipeline-world-thereabouts-part-1/我正在尝试按照https://www.confluent.io/blog/simplest-useful-kafka-connect-data-pipeline-world-thereabouts-part-1/给出的演示进行操作

Error:错误:

./bin/confluent load jdbc_source_mysql_foobar_01 -d /tmp/kafka-connect-jdbc-source.json
{
This CLI is intended for development only, not for production
https://docs.confluent.io/current/cli/index.html

{
  "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://localhost:3306/demo?user=root&password=tiger for configuration Couldn't open connection to jdbc:mysql://localhost:3306/demo?user=root&password=tiger\nInvalid value java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/demo?user=root&password=tiger for configuration Couldn't open connection to jdbc:mysql://localhost:3306/demo?user=root&password=tiger\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
}

Message No suitable driver found for means, that proper jdbc driver cannot be found.消息No suitable driver found for意味着No suitable driver found for合适的 jdbc 驱动程序。

According to article to fix above error you need to place appropriate jdbc driver in share/java/kafka-connect-jdbc根据修复上述错误的文章,您需要在share/java/kafka-connect-jdbc放置适当的 jdbc 驱动程序

To use the JDBC connector, you'll need to make available the relevant JDBC driver for your source database.要使用 JDBC 连接器,您需要为源数据库提供相关的 JDBC 驱动程序。 The connector ships with drivers for PostgreSQL and sqlite—for all others download the appropriate JAR and place it in share/java/kafka-connect-jdbc.连接器附带了 PostgreSQL 和 sqlite 的驱动程序——对于所有其他人,下载适当的 JAR 并将其放在 share/java/kafka-connect-jdbc 中。 You can find the relevant downloads here for MySQL, Oracle, SQL Server, DB2, and Teradata.您可以在此处找到 MySQL、Oracle、SQL Server、DB2 和 Teradata 的相关下载。

After copying jars, you need to restart Kafka Connect复制jar后,需要重启Kafka Connect

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM