【 TiDB 使用环境】测试环境\
【 TiDB 版本】5.2.0
【遇到的问题】使用ticdc工具将tidb数据同步到mysql 数据没有正常同步,报错如下
Error 1193: Unknown system variable 'tidb_current_ts
【复现路径】做过哪些操作出现的问题
配置ticdc 数据同步到mysql大致操作步骤如下
1 目标和源端创建空表t1
2 tiup ctl:v4.0.13 cdc changefeed create --pd=http://127.0.0.1:2379 --sink-uri=“mysql://root:root@10.221.13.111:3308” --config=ticdc_config.toml --changefeed-id=“tidb2msyql” --sync-point=true --sync-interval=10s
3 源端插入数据,目标端没有数据进去
4 查看cdc任务,发现有报错信息,咨询一下这个是什么原因导致。
通过命令cdc cli changefeed query --pd=http://127.0.0.1:2379 --changefeed-id=“tidb2msyq” 查发现如下报错
],
“error”: {
“addr”: “10.21.15.26:8300”,
“code”: “CDC:ErrOwnerUnknown”,
“message”: “[CDC:ErrMySQLTxnError]Error 1193: Unknown system variable ‘tidb_current_ts’”
},
【问题现象及影响】
通过命令cdc cli changefeed query --pd=http://127.0.0.1:2379 --changefeed-id=“tidb2msyq” 查发现如下报错
],
“error”: {
“addr”: “10.21.15.26:8300”,
“code”: “CDC:ErrOwnerUnknown”,
“message”: “[CDC:ErrMySQLTxnError]Error 1193: Unknown system variable ‘tidb_current_ts’”
},
【附件】
- 相关日志、配置文件、Grafana 监控(https://metricstool.pingcap.com/)
cdc.log.gz (13.6 MB)
ticdc scale 扩展配置文件如下
more scale-out-cdc.yaml
cdc_servers:
- host: 10.221.13.206
gc-ttl: 86400
data_dir: /tidb-data/cdc-8300
迁移配置文件如下
[root@tidb-test1 ~]# more ticdc_config.toml
case-sensitive = true
enable-old-value = true
[filter]
rules = [‘testdb1.*’]
[mounter]
worker-num = 8
- TiUP Cluster Display 信息
Starting componentcluster
: /root/.tiup/components/cluster/v1.8.1/tiup-cluster display tidb-pb-test
Cluster type: tidb
Cluster name: tidb-pb-test
Cluster version: v5.2.0
Deploy user: tidb
SSH type: builtin
Dashboard URL: http://10.221.13.206:2379/dashboard
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
10.221.13.208:9093 alertmanager 10.221.13.208 9093/9094 linux/x86_64 Up /tidb-data/alertmanager-9093 /tidb-deploy/alertmanager-9093
10.221.13.206:8300 cdc 10.221.13.206 8300 linux/x86_64 Up /tidb-data/cdc-8300 /tidb-deploy/cdc-8300
10.221.13.208:3000 grafana 10.221.13.208 3000 linux/x86_64 Up - /tidb-deploy/grafana-3000
10.221.13.206:2379 pd 10.221.13.206 2379/2380 linux/x86_64 Up|UI /tidb-data/pd-2379 /tidb-deploy/pd-2379
10.221.13.207:2379 pd 10.221.13.207 2379/2380 linux/x86_64 Up /tidb-data/pd-2379 /tidb-deploy/pd-2379
10.221.13.208:2379 pd 10.221.13.208 2379/2380 linux/x86_64 Up|L /tidb-data/pd-2379 /tidb-deploy/pd-2379
10.221.13.208:9090 prometheus 10.221.13.208 9090 linux/x86_64 Up /tidb-data/prometheus-9090 /tidb-deploy/prometheus-9090
10.221.13.206:4000 tidb 10.221.13.206 4000/10080 linux/x86_64 Up - /tidb-deploy/tidb-4000
10.221.13.207:4000 tidb 10.221.13.207 4000/10080 linux/x86_64 Up - /tidb-deploy/tidb-4000
10.221.13.208:4000 tidb 10.221.13.208 4000/10080 linux/x86_64 Up - /tidb-deploy/tidb-4000
10.221.13.206:20160 tikv 10.221.13.206 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
10.221.13.207:20160 tikv 10.221.13.207 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
10.221.13.208:20160 tikv 10.221.13.208 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
Total nodes: 13
Found cluster newer version:
The latest version: v1.11.0
Local installed version: v1.8.1
Update current component: tiup update cluster
Update all components: tiup update --all
- TiUP CLuster Edit config 信息
- TiDB-Overview 监控
- 对应模块的 Grafana 监控(如有 BR、TiDB-binlog、TiCDC 等)
- 对应模块日志(包含问题前后 1 小时日志)
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。