Reputation: 11289
I am trying to do a POC for Kafka and debezium.
I have started kafka and zookeeper and they are working... now when I try to load kafka-connect (I am kind of new to this...) I get this error that I just can't understand what I am doing wrong.
Note: I have tested all of this with the Debezium tutorial docker images, but I would like to connect from a remote server and I thought it would be easier to install everything without docker to play with the configuration
starting the connect with the following command
./connect-standalone.sh ~/kafka/config/connect-standalone.properties ~/kafka/config/connect-standalone-worker.properties ~/kafka/config/debezium-connector.properties
connect-standalone.properties
bootstrap.servers=localhost:9092 key.converter.schemas.enable=true value.converter.schemas.enable=true offset.flush.interval.ms=10000 plugin.path=/home/ubuntu/kafka/plugins
connect-standalone-worker.properties
internal.key.converter=org.apache.kafka.connect.json.JsonConverter internal.value.converter=org.apache.kafka.connect.json.JsonConverter internal.key.converter.schemas.enable=false internal.value.converter.schemas.enable=false offset.storage.file.filename=/home/user/offest value.converter=org.apache.kafka.connect.json.JsonConverter key.converter=org.apache.kafka.connect.json.JsonConverter
debezium-connector.properties
name=my-connector connector.class=io.debezium.connector.mongodb.MongoDbConnector include.schema.changes=false mongodb.name=mymongo collection.whitelist=my.collection tasks.max=1 mongodb.hosts=A.B.C.D:27017
I get the following when running the connect:
[2018-12-27 15:31:41,995] ERROR Failed to create job for /home/ubuntu/kafka/config/connect-standalone-worker.properties (org.apache.kafka.connect.cli.ConnectStandalone:102) [2018-12-27 15:31:41,996] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:113) java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector config {internal.key.converter=org.apache.kafka.connect.json.JsonConverter, offset.storage.file.filename=/home/user/offest, internal.value.converter.schemas.enable=false, internal.value.converter=org.apache.kafka.connect.json.JsonConverter, value.converter=org.apache.kafka.connect.json.JsonConverter, internal.key.converter.schemas.enable=false, key.converter=org.apache.kafka.connect.json.JsonConverter} contains no connector type at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:79) at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:66) at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:110) Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector config {internal.key.converter=org.apache.kafka.connect.json.JsonConverter, offset.storage.file.filename=/home/user/offest, internal.value.converter.schemas.enable=false, internal.value.converter=org.apache.kafka.connect.json.JsonConverter, value.converter=org.apache.kafka.connect.json.JsonConverter, internal.key.converter.schemas.enable=false, key.converter=org.apache.kafka.connect.json.JsonConverter} contains no connector type at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:259) at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:189) at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:107) [2018-12-27 15:31:41,997] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:65)
Upvotes: 2
Views: 1178
Reputation: 191874
connect-standalone.properties
and connect-standalone-worker.properties
need to be one file.
The error is saying that connect-standalone-worker.properties
has no connector.class
value (which it shouldn't because it's the worker properties, not a connector)
The command you're trying to run should look like
connect-standalone worker.properties connector1.properties [connector2.properties ... ]
Upvotes: 2