Ticdc connection to Kafka (2.4.0) error

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: ticdc 连接kafka(2.4.0) 报错

| username: TiDBer_T8aLTKMi

tidb(5.4.0) tidcd connecting to kafka (version 2.0.4, deployed in a container, cluster, test environment) reports an error: Error: [CDC:ErrKafkaNewSaramaProducer]new sarama producer: kafka: client has run out of available brokers to talk to (Is your cluster reachable?), but there is no problem connecting to the locally deployed Kafka of the same version. Can any expert advise?

Command:
tiup cdc cli changefeed create --pd=http://127.0.0.1:2379 --sink-uri=“kafka://10.10.10.10:9092/tidb_topic?protocol=canal-json&kafka-version=2.4.0” --changefeed-id=“task-2” --config task.toml

| username: TiDBer_pFFcXLgY | Original post link

Is the port open under telnet? Is authentication enabled?

| username: Tank001 | Original post link

Try using telnet to check the port. If it can’t connect, maybe try restarting?

| username: db_user | Original post link

The 9092 port of Kafka needs to be open not only to the CDC machine but also to the CDC-CTL machine. I just encountered this issue and resolved it.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.