dm 无法使用数据源并且状态呈现offline无法拉起

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:
【 TiDB 使用环境】
TIDB 4.0.4
【 DM 使用环境】
v2.0.6
【概述】
alertmessage提示worker处于下线状态。使用命令拉起worker,提示启动成功,但是集群信息仍显示offline。
在执行缩容扩容后,worker正常,但是绑定数据源开启同步后,仍然出现此异常。
从日志中获取错误信息:Message: database driver error, RawCause: Error 1129: Host ‘192.168.3.31’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’, Workaround: Please check the database connection and the database config in configuration file."
【背景】 /

【现象】 /
grafana监控图片:

日志错误信息:
[2022/01/21 13:43:24.606 +08:00] [ERROR] [worker.go:512] [“can’t open a connection to get master status”] [component=“worker controller”] [error=“[code=10001:class=database:scope=not-set:level=high], Message: database driver error, RawCause: Error 1129: Host ‘192.168.3.31’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’, Workaround: Please check the database connection and the database config in configuration file.”] [errorVerbose="[code=10001:class=database:scope=not-set:level=high], Message: database driver error, RawCause: Error 1129: Host ‘192.168.3.31’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’, Workaround: Please check the database connection and the database config in configuration file.
【问题】
日志中提示要执行flush hosts;目前在tidb端已经执行flush host,但是没有效果,目前该如何解决此问题。
【业务影响】 /

【附件】
附上在缩容扩容后的错误日志
dm-worker.log (647.8 KB)

1)报错发生在哪个阶段,dump ?
2)上游mysql实例有没有配置init-connect参数?
3)dm连接mysql的账号是否有对应的权限?

1 个赞

1、任务在出错之前正常运行,全都是sync阶段。但是实际报错和task无关,而是与source相关。因为在我停止所有任务后,缩容worker在扩容并且绑定数据源后仍然为异常状态。
2、这部分需要询问dba
3、mysql账号为统一配置,赋予权限。所有数据源都为同一个账号及权限。并且其他数据源及任务都正常同步

1)简单看日志是连接报错,看看上游mysql的error.log 看看有什么异常
2)dm用的这个账号连接是否用完?

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。