【 TiDB 使用环境】生产环境
【 TiDB 版本】5.2.2
【复现路径】pause一些changefeed
【遇到的问题:问题现象及影响】 监控看无owner,但是命令行看有,同步任务的checkpoint都不推进了
【资源配置】
【附件:截图/日志/监控】
能提供更多的信息吗?比如监控日志等,做了什么操作导致的问题?
可以尝试以下诊断步骤:
- 检查 TiCDC 相关的监控指标,例如
cdc_owner_election_duration_seconds
、cdc_owner_election_count
、cdc_processor_puller_event_queue_size
等,查看是否存在异常情况。 - 检查 TiCDC 的日志,查看是否存在相关的报错信息,例如
no owner for changefeed
、failed to elect owner
等。 - 检查 TiKV 的日志,查看是否存在相关的报错信息,例如
region is not found
、raft: rejected transfer leadership
等。 - 检查 TiCDC 的同步任务状态,查看是否存在 checkpoint 不推进的情况,例如使用命令
tiup ctl:v5.0.x cdc changefeed query --pd=http://xxx.xxx.xxx.xxx:2379 --changefeed-id=xxx { "state": "normal", "tso": xxx, "checkpoint": "xxxx-xx-xx xx:xx:xx.xxx", "error": null }
查询同步任务状态。
- cdc是否在不断重启?
- 找到owner ,重启一下试试
没找到
cdc_owner_election_duration_seconds
、cdc_owner_election_count
、cdc_processor_puller_event_queue_size
这些监控指标。
重启了也一样,命令显示有,监控显示没有
TiCDC 的日志,没有这两关键词的信息 no owner for changefeed
、failed to elect owner
cdc任务都hang住,不推进checkpoint
提供相关日志,完整的一整行,来看看