Incremental Synchronization Error in DM: Issues with task.yaml Configuration

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

Original topic: dm 增量同步报错,task.yaml配置问题

| username: cheng

【TiDB Usage Environment】Test Environment
【TiDB Version】v5.4.1
【Encountered Problem】

【Problem Phenomenon and Impact】When synchronizing MySQL incrementally to TiDB, an error occurs when adding a synchronization task. The account and password on the target side have been confirmed to be correct. The configuration is as follows. Please check where the configuration is incorrect, or if the source MySQL must enable GTID?
[tidb@db-tidb-0001 ~/tidb-community-toolkit-v5.4.1-linux-amd64/bin]$ tiup dmctl --master-addr 10.36.xxx:8261 check-task ./task.yaml
tiup is checking updates for component dmctl …
Starting component dmctl: /home/tidb/.tiup/components/dmctl/v6.0.0/dmctl/dmctl /home/tidb/.tiup/components/dmctl/v6.0.0/dmctl/dmctl --master-addr 10.36.xx.xxx:8261 check-task ./task.yaml
{
“result”: false,
“msg”: “[code=20003:class=dm-master:scope=internal:level=medium], Message: decode task config failed, RawCause: yaml: line 2: did not find expected key, Workaround: Please check the configuration file has correct YAML format.”
}

【Attachment】

| username: 超7成网友 | Original post link

The prompted YAML format is incorrect. Check if there is any issue in the configuration file.

| username: buchuitoudegou | Original post link

Is there an extra space before mysql-instances?

| username: cheng | Original post link

There is this space in the official documentation.

| username: sunzhaoyang | Original post link

The indentation of that line has an issue, there’s an extra space before the “-”.

| username: cheng | Original post link

There is an issue, there is an extra space before the “-”.

image

Removing the indentation still results in an error.

| username: buchuitoudegou | Original post link

I meant this, but it seems to have been removed according to the subsequent screenshots.

| username: cheng | Original post link

This has already been removed. Do you have a configuration file that can be started? Could you give me a copy for reference?

| username: buchuitoudegou | Original post link

| username: Z六月星星 | Original post link

There is an issue with the yml format.

| username: Hacker007 | Original post link

This clearly improves the YAML format issue. I suggest you modify it based on the official template.

| username: ealam_小羽 | Original post link

How about trying the online YAML editor and validator at YAML、YML在线编辑器(格式化校验)-BeJSON.com?

| username: cheng | Original post link

Using the official documentation will result in an error. Changing it like this solves the problem.

| username: system | Original post link

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