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.