2

I'm trying to connect MySql to Kafka using Debezium. This is the REST API, I'm trying to execute.

curl -i -X POST -H "Accept:application/json" \
    -H  "Content-Type:application/json" http://localhost:8083/connectors/ \
    -d '{
      "name": "mysql-connector",
      "config": {
            "connector.class": "io.debezium.connector.mysql.MySqlConnector",
            "database.hostname": "localhost",
            "database.port": "3306",
            "database.user": "debezium",
            "database.password": "dbz",
            "database.server.id": "223344",
            "database.server.name": "demo",
            "database.history.kafka.bootstrap.servers": "localhost:9092",
            "database.history.kafka.topic": "dbhistory.demo" ,
            "include.schema.changes": "true"
       }
    }'
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
vbhargav875
  • 837
  • 8
  • 15
  • https://stackoverflow.com/questions/41027340/curl-connection-refused – Bartosz Wardziński Jan 03 '19 at 08:19
  • How are you starting Kafka Connect / Debezium? Please show your `connect-distributed.properties` file – OneCricketeer Jan 03 '19 at 16:50
  • plugin.path=/home/vijay18 -> This is all that I have added. My home directory contains the kafka folder that i extracted after download and the debezium-mysql-connector folder. – vbhargav875 Jan 04 '19 at 06:55
  • 1
    Could you please - check that the process is really running - use netstat to see if the 8083 port is not open on other NIC than localhost? – Jiri Pechanec Jan 04 '19 at 07:41
  • Okay, you edited a property file, but how are you actually running the process? What do the logs show when you do start it?? Please [edit] your question with more details – OneCricketeer Jan 05 '19 at 23:08
  • I have configured my mysql to allow binary log files as this is required by debezium. Now I tried to execute the above API in my terminal to connect MySql to Debezium and I get the above error. I have used netstat, lsof ... all commands and I ensure you that no process is running on the port 8083. – vbhargav875 Jan 06 '19 at 07:37

0 Answers0