ticdc 扩容端口冲突

请问主机 A 上已经有了一个ticdc,monitor的端口号为 9100,计划在主机 A 上再扩容一个 ticdc 给其他集群使用,但是反复报端口冲突,我尝试修改过端口号,还是报相同的问题,请问有没有人遇到过?如何配置的?

global:
  user: tidb
  ssh_port: 22
  ssh_type: builtin
  deploy_dir: /data2/deploy
  data_dir: /data2

monitored:
  node_exporter_port: 9200
  deploy_dir: "x"
  data_dir: "x"
  log_dir: "x"
  blackbox_exporter_port: 9215


cdc_servers:
- host: x
  ssh_port: 22
  port: 8301
  deploy_dir: x
  log_dir: x

- host: x
  ssh_port: 22
  port: 8301
  deploy_dir: x
  log_dir: x

monitoring_servers:
- host: x
  ssh_port: 22
  port: 9300

报错如下:

Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.10.1/tiup-cluster /home/tidb/.tiup/components/cluster/v1.10.1/tiup-cluster scale-out x scale-out.yaml
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.
Do you want to continue? [y/N]: (default=N) y


+ Detect CPU Arch Name
  - Detecting node x Arch info ... Done
  - Detecting node x Arch info ... Done


+ Detect CPU OS Name
  - Detecting node x OS info ... Done
  - Detecting node x OS info ... 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 x

It conflicts to a port in the existing cluster:
  Existing Cluster Name: xxxxx
  Existing Port:         9100
  Existing Component:    monitor x

Please change to use another port or another host.

只要扩容cdc就可以了,其余的不需要扩容

只扩容 ticdc 也会报错,我看了下貌似 node_exporter_port 这个端口号是跟着集群建立之初来的,如果集群 A 的端口号为9100(默认)在主机A上部署了一套 ticdc,那么集群B如果要新扩容一个ticdc节点在主机A上,除非修改 node_exporter_port 的默认端口(与9100错开),否则会报端口冲突,尴尬的有两点

  1. 无法单独配置 ticdc 的 node_exporter_port 端口号
  2. 如果要修改群集的 node_exporter_port 端口号 需要重启整个实例(我又查了下貌似是无法修改的)
1赞

参考以下例子扩容 TiCDC。

$ cat ./scale-out.yaml
cdc_servers:
  - host: 172.16.5.37
    port: 47915
    deploy_dir: /data/cdc/cluster1/tidb-deploy/cdc-47915
    data_dir: /data/cdc/cluster1/tidb-data/cdc-47915

$ tiup cluster scale-out cdc-cluster1 ./scale-out.yaml

确保 “port” 中填的端口没有被其它程序占用。

查一下操作系统层面,你配置的这个端口有没有被使用

ticdc 的端口没有被占用,但监控ticdc 的端口被占用了,导致ticdc 无法扩容成功