Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb-v5.3.1:ticdc创建同步任务到kafka报controller is not available
【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】
tidb v5.3.1
【Encountered Problem】
When creating a synchronization task using the following command, an
Error: [CDC:ErrKafkaNewSaramaProducer]kafka: controller is not available: kafka: controller is not available error is reported:
tiup cdc cli changefeed create --pd=http://172.16.30.145:2379 --changefeed-id="simple-replication-task" --sort-engine="unified" --sink-uri="kafka://172.16.30.101:9092/jc-search-test?protocol=canal-json&kafka-version=2.7.0&partition-num=6&max-message-bytes=67108864&replication-factor=1"
The specific error message is as follows:
【Reproduction Path】
What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
The IP and port of Kafka can be accessed normally, and the server can also connect to Kafka normally. However, the above error occurs when creating a synchronization task.
The alert in the screenshot is triggered, and the business is not functioning properly.
I tried restarting Alertmanager and got the following error:
level=info ts=2022-09-15T12:21:07.400328946Z caller=main.go:140 msg="Starting Alertmanager" version="(version=0.17.0, branch=HEAD, revision=c7551cd75c414dc81df027f691e2eb21d4fd85b2)"
level=info ts=2022-09-15T12:21:07.400408611Z caller=main.go:141 build_context="(go=go1.12.4, user=root@932a86a52b76, date=20190503-09:10:07)"
level=error ts=2022-09-15T12:21:07.400708319Z caller=main.go:165 msg="unable to initialize gossip mesh" err="create memberlist: Could not set up network transport: failed to obtain an address: Failed to start TCP listener on \"172.16.30.145\" port 9094: listen tcp 172.16.30.145:9094: bind: cannot assign requested address"
The server firewall is turned off. Could you please tell me what the problem might be (ports 9093 and 9094 are not occupied)?
Are the version parameters, partition parameters, and replica parameters of Kafka consistent with those online?
This has nothing to do with Kafka. Check if you can normally connect to Kafka from the corresponding CDC node to produce and consume messages.