I can't create the Debezium SQL Server connector

Hi,
I created some Docker containers (Kafka, Kafka Manager, SQL Server, Debezium Connect, and Zookeeper) for data streaming, and so I need to create the Debezium SQL Server connector. I created the mssql-connector.json file with the following content:

{
“name”: “mssql-connector”,
“config”: {
“connector.class”: “io.debezium.connector.sqlserver.SqlServerConnector”,
“tasks.max”: “1”,
“database.hostname”: “mssql”,
“database.port”: “1436”,
“database.user”: “sa”,
“database.password”: “Password123@”,
“database.names”: “AdventureWorks2019”,
“database.server.name”: “DockerSql”,
“schema.include.list”: “dbo”,
“table.include.list”: “FakeData”,
“topic.prefix”: “Ds-”,
“topic.name”: “t1”,
“key.converter”: “org.apache.kafka.connect.json.JsonConverter”,
“value.converter”: “org.apache.kafka.connect.json.JsonConverter”,
“database.ssl.enabled”: true
}
}

and ran this command to create the Debezium SQL Server connector (cmd) :
curl -i -X POST -H “Content-Type: application/json” -d @mssql-connector.json http://localhost:8083/connectors

After running the above command, I received the following error message:
HTTP/1.1 400 Bad Request
Date: Thu, 19 Oct 2023 07:32:08 GMT
Content-Type: application/json
Content-Length: 622
Server: Jetty(9.4.48.v20220622)

{“error_code”:400,“message”:“Connector configuration is invalid and contains the following 1 error(s):\nUnable to connect. Check this and other connection properties. Error: The TCP/IP connection to the host mssql, port 1436 has failed. Error: "Connection refused (Connection refused). Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".\nYou can also find the above list of errors at the endpoint /connector-plugins/{connectorType}/config/validate”}

Note: I was able to connect to the Docker SQL Server instance with port 1436 via SSMS, and I have already defined a rule for port 1436 in the firewall.

please help me solve this problem.

Well, if you have an issue connecting and “created some Docker containers”, then it would make sense to share the configs and commands you executed, so we can actually understand the full situation and can try to help.

Its my docker-compose.yml configuration:

version: “latest”

services:
zookeeper:
image: debezium/zookeeper:latest
restart: always

kafka:
image: bitnami/kafka:latest
depends_on:
- zookeeper
restart: always
ports:
- “9092:9092”
environment:
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
volumes:
- ./kafka:/opt/kafka

mssql:
image: Microsoft Artifact Registry
restart: always
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Password123@
- MSSQL_PID=Enterprise
ports:
- “1436:1433”

debezium-connect:
image: debezium/connect:latest
depends_on:
- kafka
- mssql
restart: always
ports:
- 8083:8083
environment:
BOOTSTRAP_SERVERS: kafka:9092
CONNECT_BOOTSTRAP_SERVERS: “localhost:9092”
CONNECT_REST_PORT: “8083”
GROUP_ID: 1
CONFIG_STORAGE_TOPIC: connect_configs
OFFSET_STORAGE_TOPIC: connect_offsets
volumes:
- ./connectors:/usr/share/kafka/connect/connectors

kafka-manager:
image: hlebalbau/kafka-manager:latest
depends_on:
- kafka
- debezium-connect
restart: always
ports:
- 9001:9000
environment:
ZK_HOSTS: “zookeeper:2181”
APPLICATION_SECRET: “random-secret”

Please, edit your posts according to the following guide so people can actually understand your code and question. Thank you!