DM Startup Error

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

Original topic: dm启动报错

| username: 宸凡_22

[TiDB Usage Environment] Production Environment / Testing / POC
[TiDB Version]
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Problem Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: 小龙虾爱大龙虾 | Original post link

The binlog name is incorrect or has already been deleted. Compare the binlog in your configuration with the binlog on the file system.

| username: 宸凡_22 | Original post link

Where can I find the binlog configuration? Is it in the DM data source or the worker?

| username: 宸凡_22 | Original post link

The binlog has been refreshed and needs to be resynchronized; but how to clear the sync?

| username: 小龙虾爱大龙虾 | Original post link

If you delete the checkpoint table downstream, it is configured in your configuration file. Be careful not to delete the checkpoint table of another synchronization link. Then, just recreate it.

| username: 宸凡_22 | Original post link

I don’t know how to operate it, please guide me, thank you.

| username: 小龙虾爱大龙虾 | Original post link

In the DM configuration file, a database is configured to store DM metadata. There are tables with task names in this database that record checkpoint information. These checkpoint tables have a higher priority than your configuration file. Therefore, if these tables are left over from previous tasks, you need to clean them up to use the new configuration file’s checkpoints.

The first method is to manually clean up the downstream meta tables. For example, delete the tables in the dm_meta database that start with “test”. If other DM tasks share the same meta database, be careful not to delete the wrong tables.

name: test                      # Task name, must be globally unique
task-mode: all                  # Task mode, can be set to "full" - "only full data migration", "incremental" - "Binlog real-time synchronization", "all" - "full + Binlog real-time synchronization"
shard-mode: "pessimistic"       # Task coordination mode, optional modes are "", "pessimistic", "optimistic". The default value is "" which means no coordination is needed. If it is a task of merging sharded tables, please set it to pessimistic coordination mode "pessimistic".
                                # After version v2.0.6, the optimistic mode gradually matures. After thoroughly understanding the principles and usage limitations of the optimistic coordination mode, you can also set it to optimistic coordination mode "optimistic".
strict-optimistic-shard-mode: false # Only effective in optimistic coordination mode, restricts the behavior of optimistic coordination mode, default value is false. Introduced in v7.2.0, see https://docs.pingcap.com/zh/tidb/v7.2/feature-shard-merge-optimistic for details.
meta-schema: "dm_meta"          # The database that stores `meta` information downstream
# timezone: "Asia/Shanghai"     # Specifies the time zone used by the SQL Session during data migration tasks. DM uses the global time zone configuration of the target database for data migration by default and automatically ensures the correctness of synchronized data. Using a custom time zone can still ensure the correctness of the entire process, but generally does not need to be specified manually.

The second method is to add an extra parameter when creating the task to automatically delete the meta. Refer to 创建 TiDB Data Migration 数据迁移任务 | PingCAP 文档中心

remove-meta:
Optional
If set, it will remove the previously existing metadata of the specified task when starting the task.
| username: 宸凡_22 | Original post link

Use the second method to solve the problem, thank you.

| username: dba远航 | Original post link

Glad it’s resolved.

| username: system | Original post link

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