Reputation: 11
I am not using confluent, I am able to run the Zookeeper and Kafka
successfully. And following the steps to Mongo-kafka
connect using jar file and am getting an error. Once I download the mongo-kafka-connect-0.2-all.jar
file from maven tech do I need to register? I have updated the plugin path correctly. can someone help me, please?
com.mongodb.kafka.connect.MongoSinkConnectorINFO Kafka Connect started (org.apache.kafka.connect.runtime.Connect:56)
[2019-10-22 03:16:02,713] ERROR Failed to create job for config/MongoSinkConnector.properties (org.apache.kafka.connect.cli.ConnectStandalone:110)
[2019-10-22 03:16:02,714] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:121)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: Failed to find any class that implements Connector and which name matches com.mongodb.kafka.connect.MongoSinkConnector, available connectors are: PluginDesc{klass=class org.apache.kafka.connect.file.FileStreamSinkConnector,
Upvotes: 1
Views: 1259
Reputation: 32110
You have an error because Kafka Connect has not loaded the connector JAR that you're trying to use :
Failed to find any class that implements Connector and which name matches com.mongodb.kafka.connect.MongoSinkConnector
One option you have is to use the Confluent Hub tool to install the connector - you can you use it without running Confluent Platform IIRC:
confluent-hub install mongodb/kafka-connect-mongodb:0.2
The Confluent Hub tool handles stuff like plugin.path
automagically so that you don't have to.
Alternatively, you can configure it yourself. Make sure plugin.path
for your Kafka Connect worker(s) is set to include the folder in which you have the MongoDB sink connector JAR.
Upvotes: 1