1

I am trying to configure sqlserver debezium connecter in kafka on windows, for that i have downloaded the connector from here and setup kafka at C:\kafka_2.11-2.4.0 location

created a folder named plugins inside it C:\kafka_2.11-2.4.0\plugins and copied the downloaded jar into the plugins folder.

after that created worker.properties and sqlserverconnector.properties files in config folder with below configuration

worker.properties config

offset.storage.file.filename=/tmp/connect.offsets 
bootstrap.servers=localhost:9092 
offset.flush.interval.ms=10000
#rest.port=10082
#rest.host.name=localhost
#rest.advertised.port=10082
#rest.advertised.host.name=<hostname> 
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 
key.converter=org.apache.kafka.connect.json.JsonConverter 
value.converter=org.apache.kafka.connect.json.JsonConverter 
plugin.path=c:\kafka_2.11-2.4.0\plugins
#If kafka is TLS authenticated, uncomment below lines.
#security.protocol=SSL 
#ssl.truststore.location=/tmp/kafka.client.truststore.jks
#producer.security.protocol=SSL
#producer.ssl.truststore.location=/tmp/kafka.client.truststore.jks

sqlserverconnector.properties

name=sql-server-connection
connector.class=io.debezium.connector.sqlserver.SqlServerConnector
database.hostname=localhost
database.port=1433
database.user=sa
database.password=Passw0rd
database.dbname=CDCTestDB
#database.server.name=<Assign any name>
#table.whitelist=<schema_name.table_name>
database.history.kafka.bootstrap.servers=localhost:9092
database.history.kafka.topic=test
#If kafka is TLS authenticated, uncomment below lines.
#database.history.producer.security.protocol=SSL
#database.history.producer.ssl.truststore.location=/tmp/kafka.client.truststore.jks

also configured connect.standalone plugin.path property to the folder.

when I try to run the connector using the below command

C:\kafka_2.11-2.4.0\bin\windows>connect-standalone ../../config/worker.properties ../../config/sqlserverconnector.properties

i am getting the below message

 Failed to find any class that implements Connector and which name matches io.debezium.connector.sqlserver.SqlServerConnector 

complete error details in this image

if i try to run connect-standalone.sh using below command a new command prompt window is coming and nothing happens, it closes after sometime.

C:\kafka_2.11-2.4.0\bin>connect-standalone.sh ../config/worker.properties ../config/sqlserverconnector.properties

can any one help me finding what might be the issue and configure correctly..

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

3 Answers3

0

You must not place the Debezium connector JARs into plugins.dir but to a sub-directory of this dir. So if the plugins.dir is c:\connect then you should have c:\connect\debezium-connector-sqlserver

Jiri Pechanec
  • 1,816
  • 7
  • 8
0

Try changing the plugin path as follows.

plugin.path=/c/kafka_2.11-2.4.0/plugins

This ran bash needs a different syntax, this one worked for me when running in bash

Karthikeyan VK
  • 5,310
  • 3
  • 37
  • 50
0

You need to put all the jar files of the Debezium SQL server connector inside a plugins/debezium-connector-sqlserver folder. not directly in the Plugins folder.

C:\kafka\plugins\debezium-connector-sqlserver

and set the plugin.path path like this:

plugin.path=C:/kafka/plugins