DM初始化时报错[code=10006:class=database:scope=downstream:level=high]

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

  • 【TiDB 版本】:TiDB-v3.0.5
  • 【问题描述】: [2020/03/24 18:54:25.275 +08:00] [ERROR] [subtask.go:252] [“unit process error”] [subtask=single8] [unit=Load] [“error information”="{“Type”:1,“msg”:"[code=10006:class=database:scope=downstream:level=high] file ds0.ware_cg_base_info_0.sql: execute statement failed: INSERT INTO ware_cg_base_info_0 VALUES\ (2,100,‘2259’,2259,1,2,‘替米沙坦片(德茨)’,‘TMSTPDC’,‘40mg7片’,1697,‘102221’,‘国药准字H20041938’,‘6932329200059’,’’,‘盒’,’’,’’,’’,‘替米沙坦片(德茨)’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:12:22’,‘1003’,‘2019-01-23 16:12:22’,1),\ (4,100,‘2263’,2263,1,2,‘板蓝根颗粒(华葆)M’,‘BLGKLHBM’,'10g20袋’,1901,‘101864’,‘国药准字Z20043217’,‘6924935488808’,’’,‘袋’,’’,’’,’’,‘板蓝根颗粒(华葆)M’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:13:45’,‘1003’,‘2019-01-23 16:13:45’,1),\ (5,100,‘2267’,2267,1,2,‘维C银翘片’,‘WCYQP’,‘24片’,1275,‘101253’,‘国药准字Z52020455’,‘6924168200161’,’’,‘盒’,’’,’’,’’,‘维C银翘片’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:13:45’,‘1003’,‘2019-01-23 16:13:45’,1),\ (6,100,‘2269’,2269,1,2,‘抗病毒口服液1’,‘KBDKFY1’,‘10ml*10支’,1,‘103056’,‘国药准字Z33020518’,‘6923848600710’,‘12’,‘盒’,’’,’’,’’,‘抗病毒口服液’,0.00,0.00,’’,’’,’’,’’,’’,’’…: context canceled\ngithub.com/pingcap/dm/pkg/terror.(*Error).Delegate\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/terror/terror.go:267\ngithub.com/pingcap/dm/pkg/conn.(*BaseConn).ExecuteSQLWithIgnoreError\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:159\ngithub.com/pingcap/dm/pkg/conn.(*BaseConn).ExecuteSQL\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:174\ngithub.com/pingcap/dm/loader.(*DBConn).executeSQL.func2\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/db.go:149\ngithub.com/pingcap/dm/pkg/retry.(FiniteRetryStrategy).Apply\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/retry/strategy.go:71\ngithub.com/pingcap/dm/pkg/conn.(BaseConn).ApplyRetryStrategy\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:180\ngithub.com/pingcap/dm/loader.(DBConn).executeSQL\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/db.go:144\ngithub.com/pingcap/dm/loader.(Worker).run.func1\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/loader.go:152\ runtime.goexit\ \t/usr/local/go/src/runtime/asm_amd64.s:1337",“error”:{“ErrCode”:10006,“ErrClass”:1,“ErrScope”:2,“ErrLevel”:3,“Message”:"file ds0.ware_cg_base_info_0.sql: execute statement failed: INSERT INTO ware_cg_base_info_0 VALUES\ (2,100,‘2259’,2259,1,2,‘替米沙坦片(德茨)’,‘TMSTPDC’,'40mg7片’,1697,‘102221’,‘国药准字H20041938’,‘6932329200059’,’’,‘盒’,’’,’’,’’,‘替米沙坦片(德茨)’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:12:22’,‘1003’,‘2019-01-23 16:12:22’,1),\ (4,100,‘2263’,2263,1,2,‘板蓝根颗粒(华葆)M’,‘BLGKLHBM’,'10g20袋’,1901,‘101864’,‘国药准字Z20043217’,‘6924935488808’,’’,‘袋’,’’,’’,’’,‘板蓝根颗粒(华葆)M’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:13:45’,‘1003’,‘2019-01-23 16:13:45’,1),\ (5,100,‘2267’,2267,1,2,‘维C银翘片’,‘WCYQP’,‘24片’,1275,‘101253’,‘国药准字Z52020455’,‘6924168200161’,’’,‘盒’,’’,’’,’’,‘维C银翘片’,0.00,0.00,’’,’’,’’,’’,’’,’’,’’,’’,1440.00,‘1003’,‘2019-01-23 16:13:45’,‘1003’,‘2019-01-23 16:13:45’,1),\ (6,100,‘2269’,2269,1,2,‘抗病毒口服液1’,‘KBDKFY1’,'10ml10支’,1,‘103056’,‘国药准字Z33020518’,‘6923848600710’,‘12’,‘盒’,’’,’’,’’,‘抗病毒口服液’,0.00,0.00,’’,’’,’’,’’,’’,’’…: context canceled",“RawCause”:“context canceled”}}"] [2020/03/24 18:54:25.275 +08:00] [ERROR] [subtask.go:252] [“unit process error”] [subtask=single8] [unit=Load] [“error information”="{“Type”:1,“msg”:"[code=10006:class=database:scope=downstream:level=high] file h3-ware.t_ware_first_camp_info.sql: execute statement failed: INSERT INTO t_ware_first_camp_info VALUES\ (1,100,10002,8100001,1,‘JTSP2019000001’,‘DA2019000001’,2,2,820885,‘100001’,1,1,2,‘济生肾气丸’,‘JSSQW,JSSQW’,‘60g’,‘盒’,NULL,NULL,1,‘西丰县’,NULL,‘国药准字Z65020089’,NULL,NULL,279,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,3,’[54]’,1080,NULL,‘2009-08-01 10:55:00’,2,2,2,NULL,2,2,13,13,NULL,1.0000,2,2,2,2,2,2,NULL,NULL,2,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,2,2,2,NULL,NULL,NULL,1,NULL,1003,‘2009-08-01 10:55:00’,1003,‘2009-08-01 10:55:00’,NULL,NULL,NULL),\ (2,100,10002,8100002,1,‘JTSP2019000002’,‘DA2019000002’,2,2,820938,‘100002’,1,1,2,‘产后逐瘀胶囊’,‘CHZYJN,CHZYJN’,'0.3g36粒’,‘盒’,NULL,NULL,2,‘昌图县’,NULL,‘国药准字Z20050750’,NULL,‘6931107700699’,280,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,3,’[21]’,540,NULL,‘2009-08-01 10:55:00’,2,2,2,NULL,2,2,13,13,NULL,1.0000,2,2,2,2,2,2,NULL,NULL,2,2,NULL,NULL,NULL,NULL,NULL,NU…: context canceled\ngithub.com/pingcap/dm/pkg/terror.(*Error).Delegate\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/terror/terror.go:267\ngithub.com/pingcap/dm/pkg/conn.(*BaseConn).ExecuteSQLWithIgnoreError\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:159\ngithub.com/pingcap/dm/pkg/conn.(*BaseConn).ExecuteSQL\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:174\ngithub.com/pingcap/dm/loader.(*DBConn).executeSQL.func2\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/db.go:149\ngithub.com/pingcap/dm/pkg/retry.(*FiniteRetryStrategy).Apply\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/retry/strategy.go:71\ngithub.com/pingcap/dm/pkg/conn.(*BaseConn).ApplyRetryStrategy\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/pkg/conn/baseconn.go:180\ngithub.com/pingcap/dm/loader.(*DBConn).executeSQL\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/db.go:144\ngithub.com/pingcap/dm/loader.(Worker).run.func1\ \t/home/jenkins/agent/workspace/build_dm_master/go/src/github.com/pingcap/dm/loader/loader.go:152\ runtime.goexit\ \t/usr/local/go/src/runtime/asm_amd64.s:1337",“error”:{“ErrCode”:10006,“ErrClass”:1,“ErrScope”:2,“ErrLevel”:3,“Message”:"file h3-ware.t_ware_first_camp_info.sql: execute statement failed: INSERT INTO t_ware_first_camp_info VALUES\ (1,100,10002,8100001,1,‘JTSP2019000001’,‘DA2019000001’,2,2,820885,‘100001’,1,1,2,‘济生肾气丸’,‘JSSQW,JSSQW’,‘60g’,‘盒’,NULL,NULL,1,‘西丰县’,NULL,‘国药准字Z65020089’,NULL,NULL,279,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,3,’[54]’,1080,NULL,‘2009-08-01 10:55:00’,2,2,2,NULL,2,2,13,13,NULL,1.0000,2,2,2,2,2,2,NULL,NULL,2,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,2,2,2,NULL,NULL,NULL,1,NULL,1003,‘2009-08-01 10:55:00’,1003,‘2009-08-01 10:55:00’,NULL,NULL,NULL),\ (2,100,10002,8100002,1,‘JTSP2019000002’,‘DA2019000002’,2,2,820938,‘100002’,1,1,2,‘产后逐瘀胶囊’,‘CHZYJN,CHZYJN’,'0.3g36粒’,‘盒’,NULL,NULL,2,‘昌图县’,NULL,‘国药准字Z20050750’,NULL,‘6931107700699’,280,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,2,NULL,NULL,3,’[21]’,540,NULL,‘2009-08-01 10:55:00’,2,2,2,NULL,2,2,13,13,NULL,1.0000,2,2,2,2,2,2,NULL,NULL,2,2,NULL,NULL,NULL,NULL,NULL,NU…: context canceled",“RawCause”:“context canceled”}}"]

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

麻烦看一下 DM 的版本是否低于 1.0.3 , 可以通过 {dm_worker_deploy_path}/bin/dm-worker -V 确认。 DM 在 1.0.3 版本 Fix 了关于这块的错误输出,详见:1.0.3 变更修复 , 建议先升级再进行尝试,升级流程详见:DM 升级