TiDB 5.0 TiUP 支持在 tidb server服务器上部署drainer

需求反馈
请清晰准确地描述问题场景、需求行为及背景信息,更有利于产品同学及时跟进需求
【需求涉及的问题场景】
TiDB 5.0 版本使用binlog做双向复制,但是使用tiup在本集群的tidb-server上部署drainer时提示9100 exporter 端口冲突。

【期望的需求行为】
期望tiup支持在tidb-server服务器上部署drainer,资源合理利用,不用寻找独立的服务器部署drainer。

【需求可替代方案】
目前cdc不支持双向复制。

【背景信息】
如哪些用户将从中获益,以及一些使用场景,任何API设计,模型或者图标都会更有帮助。

看下你的集群部署的拓扑文件吧
9100是Node_exporter的端口,和drainer没有关系

1 个赞

不是的,和集群拓扑文件没关系,是部署drainer时提示端口冲突,具体日志如下

  • Detect CPU Arch
    • Detecting node xx.xx.xx.xx … Done

Error: Deploy port conflicts to an existing cluster (spec.deploy.port_conflict)

The port you specified in the topology file is:
Port: 9100
Component: monitor xx.xx.xx.xx

It conflicts to a port in the existing cluster:
Existing Cluster Name: test
Existing Port: 9100
Existing Component: monitor xx.xx.xx.xx

Please change to use another port or another host.

说明:
其中 xx.xx.xx.xx 是集群中的一台 tidb server 服务器。
目的是想在这台服务器上部署 drainer ,提示端口冲突。
而drainer扩容文件里是无法写expoter的端口的

你是想在已有的集群上扩容一个drainer上去对吧,并且上面已经有一个tidb server了。

你试试在扩容的yaml文件里给drainer指定新的exporter看行不行

monitored:
  node_exporter_port: 9200
  blackbox_exporter_port: 9215
1 个赞

是的,是你说的这意思,谢谢

monitored:
node_exporter_port: 9200
blackbox_exporter_port: 9215

这样不行,报如下提示

You have one or more of [“global”, “monitored”, “server_configs”] fields configured in
the scale out topology, but they will be ignored during the scaling out process.
If you want to use configs different from the existing cluster, cancel now and
set them in the specification fileds for each host.

如果选择 Y 继续安装,则报的错误和上面一样,还是报9100冲突

2 个赞

把你扩容drainer的yaml文件发一下,还有tiup cluster display的输出也看下

我详细测试一下再反馈结果,多谢

tiup cluster edit-config xxxx 调整端口试试呢

【 测试结果 】
集群1:TiDB 集群
集群2:TiDB 集群
集群3:MySQL 集群

  1. 集群1的drainer部署在集群1的tidb server上同步到集群2
    测试结果:成功
  2. 集群1的drainer部署在集群2的tidb server上同步到集群2
    测试结果:失败,9100冲突
  3. 集群1的drainer部署在集群1的tidb server上同步到集群3
    测试结果:成功
  4. 集群1的drainer部署在集群2的tidb server上同步到集群3
    测试结果:失败,9100冲突
  5. 集群1的drainer_1部署在独立服务器xx.xx.xx.xx上同步到集群2,同时集群1的drainer_2部署在独立服务器xx.xx.xx.xx上同步到集群3
    测试结果:成功

结论:
集群 1 的 drainer 无法部署在集群 2 的 tidb server 上同步到其它集群

我按你这种情况部署了一下是可以的,没有发生9100端口冲突,监控也能正常使用

可以发一下你的drainer配置参考一下吗,感谢

drainer_servers:
  - host: 10.x.x.235
    # drainer meta data directory path 
    data_dir: "/data/binlog"
    config:
      syncer.db-type: "file"

235这台机器上部署了另一个集群的pd和tidb。

tidb版本是5.4.0,tiup是1.9.4

感谢,我测试一下

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