问题描述
我已经安装了confluent_3.3.0,并启动了zookeper,schema-registry和kafka代理.我还从此链接下载了mongodb连接器.
I've installed confluent_3.3.0 and started zookeper, schema-registry and kafka broker. I have also downloaded mongodb connector from this link.
说明:我正在使用以下命令运行接收器连接器:
Description: I'm running sink connector using the following command:
./bin/connect-standalone etc/kafka/connect-standalone.properties /home/username/mongo-connect-test/kafka-connect-mongodb/quickstart-couchbase-sink.properties
问题:出现以下错误:
ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:91)
java.lang.IllegalAccessError: tried to access field org.apache.kafka.common.config.ConfigDef.NO_DEFAULT_VALUE from class org.radarcns.mongodb.MongoDbSinkConnector
感谢您的阅读!
推荐答案
此连接器正在使用最新版本的kafka-clients API的旧版本.具体来说,取决于Apache Kafka版本>= 0.11.0.0
This connector is using, at its latest version, an old version of the kafka-clients API. Specifically, it is depending on a constructor of the class org.apache.kafka.common.config.AbstractConfig
that does not exist in Apache Kafka versions >= 0.11.0.0
Confluent Platform版本3.3.0
使用的是Apache Kafka 0.11.0.0
Confluent Platform version 3.3.0
is using Apache Kafka 0.11.0.0
要解决此问题,建议的方法是将连接器代码更新为使用最新版本的Apache Kafka API.
To fix this issue, the recommended approach would be to update the connector code to use the most recent versions of Apache Kafka APIs.
这篇关于kafka mongodb接收器连接器无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!