Tiup dmctl create encounters dial tcp i/o timeout, but connection tests through MySQL and telnet are normal

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

Original topic: tiup dmctl create 出现dial tcp i/o timeout,但是通过mysql和telnet测试连接正常

| username: wangzhihong

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] v5.0.6
[Reproduction Path]
Error reported after execution:
IP01 is the master on the local machine, executing the command on the IP01 server, telnet from IP01 to IP02 port 20199 is normal;

tidb@dmm-001:~/dm/source$ tiup dmctl --master-addr IP01:8261 operate-source create dmw-089-32-50-2-16-source.yaml

// The dmw-089-32-50-2-16-source.yaml configuration file contains the MySQL database connection information for IP02, with port 20199

Found dmctl newer version:

The latest version:         v7.0.0
Local installed version:    v2.0.3
Update current component:   tiup update dmctl
Update all components:      tiup update --all

Starting component dmctl: /home/tidb/.tiup/components/dmctl/v2.0.3/dmctl/dmctl --master-addr IP01:8261 operate-source create dmw-089-32-50-2-16-source.yaml
{
“result”: false,
“msg”: “[code=10001:class=database:scope=not-set:level=high], Message: database driver error, RawCause: dial tcp IP02:20199: i/o timeout, Workaround: Please check the database connection and the database config in configuration file.”,
“sources”: [
]
}
MySQL connection is normal:
tidb@dmm-001:~/dm/source$ mysql -test -hIP02 -P20199 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3292709
Server version: 5.6.33-log MySQL Community Server (GPL)

Telnet is also normal
tidb@dmm-001:~/dm/source$ telnet IP02 20199
Trying IP02…
Connected to IP02.
Escape character is ‘^]’.
N
[Encountered Problem: Problem Phenomenon and Impact]
“msg”: “[code=10001:class=database:scope=not-set:level=high], Message: database driver error, RawCause: dial tcp IP02:20199: i/o timeout, Workaround: Please check the database connection and the database config in configuration file.”,
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: dba-kit | Original post link

Not only must the dm-master node be able to reach the MySQL port, but the network policy for the dm-worker node must also be open.

| username: wangzhihong | Original post link

The task from work to master is normal, and the data is also being synchronized. However, due to the modification of the network path from master to work, the path from master to work has become invalid. Currently, the master cannot manage the existing work. When trying to rebind, the current issue arises.

| username: dba-kit | Original post link

What I mean by network here is not just the network policy from dm-master to dm-worker, but also the network policy from dm-worker to MySQL.