Issue with Confluent JDBC Source connector(Confluent JDBC Source 连接器的问题)
问题描述
我在尝试将 confluent 用于 kafka-connect 时遇到以下问题.我正在尝试按照 https://www.confluent.io/blog/simplest-useful-kafka-connect-data-pipeline-world-thereabouts-part-1/
I'm getting the below issue while trying to use the confluent for 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/
错误:
./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 fit driver found for
表示找不到合适的 jdbc 驱动程序.
Message No suitable driver found for
means, that proper jdbc driver cannot be found.
根据文章要修复上述错误,您需要在 share/java/kafka-connect-jdbc
According to article to fix above error you need to place appropriate jdbc driver in share/java/kafka-connect-jdbc
要使用 JDBC 连接器,您需要为源数据库提供相关的 JDBC 驱动程序.连接器附带了 PostgreSQL 和 sqlite 的驱动程序——对于所有其他人,下载适当的 JAR 并将其放在 share/java/kafka-connect-jdbc 中.您可以在此处找到 MySQL、Oracle、SQL Server、DB2 和 Teradata 的相关下载.
To use the JDBC connector, you’ll need to make available the relevant JDBC driver for your source database. 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. You can find the relevant downloads here for MySQL, Oracle, SQL Server, DB2, and Teradata.
复制jar后,需要重启Kafka Connect
After copying jars, you need to restart Kafka Connect
这篇关于Confluent JDBC Source 连接器的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Confluent JDBC Source 连接器的问题
基础教程推荐
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01