Issues and Solutions Encountered When Deploying TiCDC Using TiUP

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

Original topic: 使用tiup部署TiCDC遇到问题及解决

| username: 麻烦是朋友

[TiDB Version]
Cluster version: v5.0.0

[Encountered Problem]
When writing the scale-out file, the parameter data_dir is not recognized.
line 6: field data_dir not found in type spec.CDCSpec

[Problem Phenomenon and Impact]
tiup cluster scale-out calctidb-cluster scale-out-ticdc.yaml
Found cluster newer version:

The latest version: v1.10.2
Local installed version: v1.4.1
Update current component: tiup update cluster
Update all components: tiup update --all

Starting component cluster: /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster scale-out calctidb-cluster scale-out-ticdc.yaml

Error: Failed to parse topology file scale-out-ticdc.yaml (topology.parse_failed)
caused by: yaml: unmarshal errors:
line 6: field data_dir not found in type spec.CDCSpec
line 11: field data_dir not found in type spec.CDCSpec

Please check the syntax of your topology file scale-out-ticdc.yaml and try again.
Error: run /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster (wd:/home/tidb/.tiup/data/TArcMg4) failed: exit status 1

[Attachment]
- Related logs, configuration files
cdc_servers:

  • host: xxx.xx.3.116
    gc-ttl: 86400
    deploy_dir: /tidb/cdc-8300
    log_dir: /tidb/cdc-8300/log
    data_dir: “/data03/cdc-8300”

  • host: xxx.xx.3.117
    gc-ttl: 86400
    deploy_dir: /tidb/cdc-8300
    log_dir: /tidb/cdc-8300/log
    data_dir: “/data03/cdc-8300”

  • TiUP Cluster Display Information
    tiup cluster display calctidb-cluster
    Found cluster newer version:

      The latest version: v1.10.2
      Local installed version: v1.4.1
      Update current component: tiup update cluster
      Update all components: tiup update --all
    

    Starting component cluster: /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster display calctidb-cluster
    Cluster type: tidb
    Cluster name: calctidb-cluster
    Cluster version: v5.0.0
    SSH type: builtin
    Dashboard URL: http://xxx.xx.3.114:2379/dashboard

[Solution]
Upgrade tiup and rerun the scale-out command
$ tiup update --self
$ tiup update --all
$ tiup update --self
$ tiup update --all
$ tiup update --self
download https://tiup-mirrors.pingcap.com/tiup-v1.10.2-linux-amd64.tar.gz 6.81 MiB / 6.81 MiB 100.00% 14.37 MiB/s
Updated successfully!
$ tiup update --all
download https://tiup-mirrors.pingcap.com/cluster-v1.10.2-linux-amd64.tar.gz 8.28 MiB / 8.28 MiB 100.00% 6.09 MiB/s
download https://tiup-mirrors.pingcap.com/ctl-v6.1.0-linux-amd64.tar.gz 277.65 MiB / 277.65 MiB 100.00% 9.45 MiB/s
download https://tiup-mirrors.pingcap.com/dm-v1.10.2-linux-amd64.tar.gz 7.93 MiB / 7.93 MiB 100.00% 12.90 MiB/s
download https://tiup-mirrors.pingcap.com/dmctl-v6.1.0-linux-amd64.tar.gz 41.75 MiB / 41.75 MiB 100.00% 9.99 MiB/s
Updated successfully!

$ tiup cluster scale-out calctidb-cluster scale-out-ticdc.yaml
tiup is checking updates for component cluster …
Starting component cluster: /home/tidb/.tiup/components/cluster/v1.10.2/tiup-cluster scale-out calctidb-cluster scale-out-ticdc.yaml

+ Detect CPU Arch Name
  - Detecting node xxx.xx.3.116 Arch info ... Done
  - Detecting node xxx.xx.3.117 Arch info ... Done

+ Detect CPU OS Name
  - Detecting node xxx.xx.3.116 OS info ... Done
  - Detecting node xxx.xx.3.117 OS info ... Done
Please confirm your topology:
Cluster type: tidb
Cluster name: calctidb-cluster
Cluster version: v5.0.0
Role  Host          Ports  OS/Arch       Directories
----  ----          -----  -------       -----------
cdc   xxx.xx.3.116  8300   linux/x86_64  /tidb/cdc-8300,/data03/cdc-8300
cdc   xxx.xx.3.117  8300   linux/x86_64  /tidb/cdc-8300,/data03/cdc-8300
Attention:
    1. If the topology is not what you expected, check your yaml file.
    2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y
...
Scaled cluster `calctidb-cluster` out successfully
| username: TammyLi | Original post link

Version v1.4.1 is too low and does not support the parameter data-dir.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.