TiCDC Reports Error: election: no leader

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

Original topic: TiCDC报Error: election: no leader

| username: liarby

[TiDB Environment] Test Environment
[TiDB Version] v5.4.2
[Issue Encountered] Error when creating TiCDC query task: Error: election: no leader
[Reproduction Path] Initially, TiDB did not have TiCDC. After scaling out a node and using tiup cdc cli changefeed list --pd=http://172.xxx.xxx.27:2379 to query tasks, it reports the error: Error: election: no leader. Creating a task also reports the same error.
[Issue Phenomenon and Impact] Error: election: no leader


[Attachments]

  • Relevant logs, configuration files, Grafana monitoring (https://metricstool.pingcap.com/)
  • TiUP Cluster Display information
  • TiUP Cluster Edit config information
  • TiDB-Overview monitoring
  • Corresponding module Grafana monitoring (if any, such as BR, TiDB-binlog, TiCDC, etc.)
  • Corresponding module logs (including logs from 1 hour before and after the issue)

If the question is related to performance optimization or fault troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results for upload.

| username: songxuecheng | Original post link

Restart the CDC service. There should be no election for the owner.

| username: asddongmen | Original post link

Hello, the reason for this error is that you used the v6.2.0 cdc cli to query the 5.4.2 cluster. Please specify the same version as the cdc server when using tiup cdc cli.

| username: 不输土豆 | Original post link

Encountered the same issue and found that the PD was specified incorrectly. The PD here should be the PD server of the source cluster.