cdc同步报错,如何查找详细信息

版本5.0.3
今天同步出现错误,日志中没有体现具体的语句以及数据库表的信息,这个要如何排查?

[2021/11/03 14:38:57.685 +08:00] [WARN] [mysql.go:882] [“execute DMLs with error, retry later”] [error="[CDC:ErrMySQLTxnError]Error 1054: Unknown column ‘Sort’ in ‘field list’"] [errorVerbose="[CDC:ErrMySQLTxnError]Error 1054: Unknown column ‘Sort’ in ‘field list’\ngithub.com/pingcap/errors.AddStack\ \tgithub.com/pi
ngcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174\ngithub.com/pingcap/errors.(*Error).GenWithStackByCause\ \tgithub.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/normalize.go:279\ github.com/pingcap/ticdc/pkg/errors.WrapError\ \tgithub.com/pingcap/ticdc@/pkg/errors/helper.go:28\ github.com/
pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2.3\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:905\ github.com/pingcap/ticdc/cdc/sink.(*Statistics).RecordBatchExecution\ \tgithub.com/pingcap/ticdc@/cdc/sink/statistics.go:99\ github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries.func2
\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:893\ github.com/pingcap/ticdc/pkg/retry.Run.func1\ \tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:32\ github.com/cenkalti/backoff.RetryNotify\ \tgithub.com/cenkalti/backoff@v2.2.1+incompatible/retry.go:37\ github.com/cenkalti/backoff.Retry\ \tgithub.com/cenkalti/backof
f@v2.2.1+incompatible/retry.go:24\ngithub.com/pingcap/ticdc/pkg/retry.Run\ \tgithub.com/pingcap/ticdc@/pkg/retry/retry.go:31\ github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLWithMaxRetries\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:885\ github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).execDMLs\ \tgithub.com/
pingcap/ticdc@/cdc/sink/mysql.go:1044\ngithub.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run.func3\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:799\ github.com/pingcap/ticdc/cdc/sink.(*mysqlSinkWorker).run\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:820\ github.com/pingcap/ticdc/cdc/sink.(*mysqlSink).createS
inkWorkers.func1\ \tgithub.com/pingcap/ticdc@/cdc/sink/mysql.go:640\ runtime.goexit\ \truntime/asm_amd64.s:1357"]
[2021/11/03 14:38:57.685 +08:00] [ERROR] [mysql.go:1045] [“execute DMLs failed”] [err="[CDC:ErrMySQLTxnError]Error 1054: Unknown column ‘Sort’ in ‘field list’"]

1 Like

可以试着把日志往上翻翻,看看报错上面最后一个出现的 region_id 是多少。

再通过 curl 命令去 PD 里找下对应 region 的具体信息,curl http://XXX.XXX.XXX.XXX:10080/regions/{region_id}

1 Like

看起来上下游的表结构不一样了,得确保上下游保持一致

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