When there is an operate-source, the task migration prompts "field source-id not found in type config" when starting

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

Original topic: 存在operate-source,在启动task迁移任务时提示field source-id not found in type config

| username: 这是一个用户名

[TiDB Usage Environment] Test environment
[TiDB Version] tiup:v6.1.0 source mysql:8.0.25 dm:v1.10.3 dmctl: v6.1.0
[Encountered Problem] Creating mysql operate-source is normal, but the dmctl check-task task check fails.
[Problem Phenomenon and Impact]
Execution: tiup dmctl --master-addr 10.10.1.38:8261 operate-source show
Return: {
“result”: true,
“msg”: “”,
“sources”: [
{
“result”: true,
“msg”: “”,
“source”: “mysql-01”,
“worker”: “dm-10.10.1.24-8262”
},
{
“result”: true,
“msg”: “”,
“source”: “mysql-8”,
“worker”: “dm-10.10.1.38-8262”
}
]
} Among them, the mysql-01 data source is mysql5.7 version, and the import is normal.

Create task yaml file:

******** Data Source Configuration **********

mysql-instances:

  • source-id: “mysql-8” # Migrate data from source-id = mysql-replica-01 data source
    block-allow-list: “bw-rule-1” # Black and white list configuration name, if DM version is earlier than v2.0.0-beta.2 use black-white-list

filter-rules: [“filter-rule-1”] # Rules for filtering specific operations of the data source, multiple filter rules can be configured

route-rules: ["route-rule-1"]   # Routing rules for migrating data source tables to target TiDB tables, multiple rules can be defined

- source-id: “mysql-replica-02” # Migrate data from source-id = mysql-replica-02 data source

block-allow-list: “bw-rule-2” # Black and white list configuration name, if DM version is earlier than v2.0.0-beta.2 use black-white-list

filter-rules: [“filter-rule-2”] # Rules for filtering specific operations of the data source, multiple filter rules can be configured

route-rules: [“route-rule-2”] # Routing rules for migrating data source tables to target TiDB tables, multiple rules can be defined

Execution: tiup dmctl --master-addr 10.10.1.24:8261 check-task /opt/source-mysql8-test.yaml
Return: “msg”: “[code=20003:class=dm-master:scope=internal:level=medium], Message: decode task config failed, RawCause: yaml: unmarshal errors:
line 1: field source-id not found in type config.TaskConfig
line 3: field from not found in type config.TaskConfig, Workaround: Please check the configuration file has correct YAML format.”

| username: 这是一个用户名 | Original post link

Version issue, it is not recommended to use a MySQL version higher than 8.0.0, but you can try it out.
“errors”: [
{
“severity”: “warn”,
“short_error”: “version suggested less than 8.0.0 but got 8.0.25”
}
]

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.