mysql - Confluent JDBC 源连接器的问题
问题描述
在尝试将融合用于 kafka-connect 时,我遇到了以下问题。我正在尝试遵循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`"
}
解决方案
消息No suitable driver found for
意味着,找不到合适的 jdbc 驱动程序。
根据修复上述错误的文章,您需要在其中放置适当的 jdbc 驱动程序share/java/kafka-connect-jdbc
要使用 JDBC 连接器,您需要为您的源数据库提供相关的 JDBC 驱动程序。该连接器附带 PostgreSQL 和 sqlite 驱动程序——所有其他人下载适当的 JAR 并将其放在 share/java/kafka-connect-jdbc 中。您可以在此处找到 MySQL、Oracle、SQL Server、DB2 和 Teradata 的相关下载。
复制jar后需要重启Kafka Connect
推荐阅读
- c++ - C ++如何在派生类中禁用非常量函数?
- php - 是否为用于购物车 _upload 的 php 会话添加安全性?
- r - 根据R中行中的值组合Dataframe
- wpf - WPF:动画后将网格可见性切换回第一个状态(折叠)
- apache - 很多httpd进程
- lua - 是否可以更改 NodeMcu 错误消息的输出位置?
- apache - RewriteRule 返回“EXCESSIVE REDIRECTS”错误
- python - 日期转换为
而不是 datetime.datetime - python - 如何在 Python 中调整图像数组的大小
- python - 拟合管道时 Pyspark ML 管道错误