問(wèn)題描述
我在嘗試將 confluent 用于 kafka-connect 時(shí)遇到以下問(wèn)題.我正在嘗試按照 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/
錯(cuò)誤:
./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 驅(qū)動(dòng)程序.
Message No suitable driver found for
means, that proper jdbc driver cannot be found.
根據(jù)文章要修復(fù)上述錯(cuò)誤,您需要在 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 連接器,您需要為源數(shù)據(jù)庫(kù)提供相關(guān)的 JDBC 驅(qū)動(dòng)程序.連接器附帶了 PostgreSQL 和 sqlite 的驅(qū)動(dòng)程序——對(duì)于所有其他人,下載適當(dāng)?shù)?JAR 并將其放在 share/java/kafka-connect-jdbc 中.您可以在此處找到 MySQL、Oracle、SQL Server、DB2 和 Teradata 的相關(guān)下載.
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.
復(fù)制jar后,需要重啟Kafka Connect
After copying jars, you need to restart Kafka Connect
這篇關(guān)于Confluent JDBC Source 連接器的問(wèn)題的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!