【概述】新版本 V5.0.2,重新部署cdc,无法启动
【背景】直接扩容CDC
【现象】CDC无法启动,timed out waiting for port 8300 to be started after 2m0s
【业务影响】无法正常部署CDC
【TiDB 版本】V5.0.2
cdc-scale-out.yml
cdc_servers:
- host: x.x.x.x
port: 8300
deploy_dir: "/tidb/tidb-cdc/cdc-8300"
log_dir: "/tidb/tidb-cdc/cdc-8300/log"
- host: x.x.x.x
port: 8300
deploy_dir: "/tidb/tidb-cdc/cdc-8300"
log_dir: "/tidb/tidb-cdc/cdc-8300/log"
- host: x.x.x.x
port: 8300
deploy_dir: "/tidb/tidb-cdc/cdc-8300"
log_dir: "/tidb/tidb-cdc/cdc-8300/log"
run_cdc.sh
#!/bin/bash
set -e
# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!
DEPLOY_DIR=/tidb/tidb-cdc/cdc-8300
cd "${DEPLOY_DIR}" || exit 1
exec bin/cdc server \
--addr "0.0.0.0:8300" \
--advertise-addr "x.x.x.x:8300" \
--pd "http://x.x.x.x:2379,http://x.x.x.x:2379,http://x.x.x.x:2379" \
--data-dir="/tidb/tidb-data/cdc-8300" \
--config conf/cdc.toml \
--log-file "/tidb/tidb-cdc/cdc-8300/log/cdc.log" 2>> "/tidb/tidb-cdc/cdc-8300/log/cdc_stderr.log"
启动报错日志
Jun 11 15:03:22 tidb-ecs systemd: Started cdc service.
Jun 11 15:03:22 tidb-ecs run_cdc.sh: Error: unknown flag: --data-dir
Jun 11 15:03:22 tidb-ecs run_cdc.sh: Usage:
Jun 11 15:03:22 tidb-ecs run_cdc.sh: cdc server [flags]
Jun 11 15:03:22 tidb-ecs run_cdc.sh: Flags:
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --addr string Set the listening address (default "127.0.0.1:8300")
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --advertise-addr string Set the advertise listening address for client communication
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --ca string CA certificate path for TLS connection
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --cert string Certificate path for TLS connection
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --cert-allowed-cn string Verify caller's identity (cert Common Name). Use ',' to separate multiple CN
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --config string Path of the configuration file
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --gc-ttl int CDC GC safepoint TTL duration, specified in seconds (default 86400)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: -h, --help help for server
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --key string Private key path for TLS connection
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --log-file string log file path
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --log-level string log level (etc: debug|info|warn|error) (default "info")
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --owner-flush-interval duration owner flushes changefeed status interval (default 200ms)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --pd string Set the PD endpoints to use. Use ',' to separate multiple PDs (default "http://127.0.0.1:2379")
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --processor-flush-interval duration processor flushes task status interval (default 100ms)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sort-dir string sorter's temporary file directory (default "/tmp/cdc_sort")
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sorter-chunk-size-limit uint size of heaps for sorting (default 1073741824)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sorter-max-memory-consumption uint maximum memory consumption of in-memory sort (default 8589934592)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sorter-max-memory-percentage int system memory usage threshold for forcing in-disk sort (default 80)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sorter-num-concurrent-worker int sorter concurrency level (default 4)
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --sorter-num-workerpool-goroutine int sorter workerpool size (default 16)
Jun 11 15:03:22 tidb-ecs systemd: cdc-8300.service: main process exited, code=exited, status=1/FAILURE
Jun 11 15:03:22 tidb-ecs run_cdc.sh: --tz string Specify time zone of TiCDC cluster (default "System")
Jun 11 15:03:22 tidb-ecs run_cdc.sh: unknown flag: --data-dir
Jun 11 15:03:22 tidb-ecs systemd: Unit cdc-8300.service entered failed state.
Jun 11 15:03:22 tidb-ecs systemd: cdc-8300.service failed.
Jun 11 15:03:37 tidb-ecs systemd: cdc-8300.service holdoff time over, scheduling restart.
Jun 11 15:03:37 tidb-ecs systemd: Stopped cdc service.
如果手动修改run_cdc.sh,删除data–dir,是可以手动启动的,但是每次在tiup上restart都会重新被中心配置覆盖,带上data-dir参数再次导致启动失败。