TiDB DM同步報錯ErrCode 44006處理一例
TiDB DM同步ErrCode 44006錯誤一般是由於源端做了DDL變更導致的。
報錯資訊如下:
# tiup dmctl --master-addr 192.168.1.1:8261 query-status test
tiup is checking updates for component dmctl ...
A new version of dmctl is available:
The latest version: v6.0.0
Local installed version: v5.4.0
Update current component: tiup update dmctl
Update all components: tiup update --all
Starting component `dmctl`: /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl --master-addr 192.168.1.1:8261 query-status test
{
"result": true,
"msg": "",
"sources": [
{
"result": true,
"msg": "",
"sourceStatus": {
"source": "mysql-replica-01",
"worker": "dm-192.168.1.1-8262",
"result": null,
"relayStatus": null
},
"subTaskStatus": [
{
"name": "test",
"stage": "Paused",
"unit": "Sync",
"result": {
"isCanceled": false,
"errors": [
{
"ErrCode": 44006,
"ErrClass": "schema-tracker",
"ErrScope": "internal",
"ErrLevel": "high",
"Message": "startLocation: [position: (mysql-bin.000387, 175542807), gtid-set: 2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92442922], endLocation: [position: (mysql-bin.000387, 175543234), gtid-set: 2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92442923], origin SQL: [ALTER TABLE `test_agent`.`tesst_copy` \r\nCHANGE COLUMN `name1` `regionName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL AFTER `id`,\r\nCHANGE COLUMN `regionName` `countyName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL AFTER `regionName`]: cannot track DDL: ALTER TABLE `test_agent`.`tesst_copy` CHANGE COLUMN `name1` `regionName` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL AFTER `id`",
"RawCause": "[schema:1060]Duplicate column name 'regionName'",
"Workaround": ""
}
],
"detail": null
},
"unresolvedDDLLockID": "",
"sync": {
"totalEvents": "18713",
"totalTps": "148",
"recentTps": "0",
"masterBinlog": "(mysql-bin.000387, 292993160)",
"masterBinlogGtid": "2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92594451",
"syncerBinlog": "(mysql-bin.000387, 175542732)",
"syncerBinlogGtid": "2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92442922",
"blockingDDLs": [
],
"unresolvedGroups": [
],
"synced": false,
"binlogType": "remote",
"secondsBehindMaster": "0"
}
}
]
}
]
}
從RDS端匯出報錯的表:
# mysqldump -h xxxxx.rds.aliyuncs.com -u root -p'xxxxxx' --set-gtid-purged=OFF test_agent tesst_copy > tesst_copy.sql
TiDB端匯入
# mysql -uroot -p123456 -h 192.168.1.3 -P 4000 < tesst_copy.sql
跳過錯誤:
# tiup dmctl --master-addr 192.168.1.1:8261 handle-error test skip
tiup is checking updates for component dmctl ...
A new version of dmctl is available:
The latest version: v6.0.0
Local installed version: v5.4.0
Update current component: tiup update dmctl
Update all components: tiup update --all
Starting component `dmctl`: /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl --master-addr 192.168.1.1:8261 handle-error test skip
{
"result": true,
"msg": "",
"sources": [
{
"result": true,
"msg": "",
"source": "mysql-replica-01",
"worker": "dm-192.168.1.1-8262"
}
]
}
再次檢視任務,已正常恢復同步:
# tiup dmctl --master-addr 192.168.1.1:8261 query-status test
tiup is checking updates for component dmctl ...
A new version of dmctl is available:
The latest version: v6.0.0
Local installed version: v5.4.0
Update current component: tiup update dmctl
Update all components: tiup update --all
Starting component `dmctl`: /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl /root/.tiup/components/dmctl/v5.4.0/dmctl/dmctl --master-addr 192.168.1.1:8261 query-status test
{
"result": true,
"msg": "",
"sources": [
{
"result": true,
"msg": "",
"sourceStatus": {
"source": "mysql-replica-01",
"worker": "dm-192.168.1.1-8262",
"result": null,
"relayStatus": null
},
"subTaskStatus": [
{
"name": "test",
"stage": "Running",
"unit": "Sync",
"result": null,
"unresolvedDDLLockID": "",
"sync": {
"totalEvents": "26165",
"totalTps": "694",
"recentTps": "0",
"masterBinlog": "(mysql-bin.000387, 294077175)",
"masterBinlogGtid": "2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92594657",
"syncerBinlog": "(mysql-bin.000387, 175575178)",
"syncerBinlogGtid": "2ae5ff08-749b-11ec-b0b8-043f72e4f03a:1-3128394,57830545-209f-11ea-94cf-b8599fb677d0:1-92442942",
"blockingDDLs": [
],
"unresolvedGroups": [
],
"synced": false,
"binlogType": "remote",
"secondsBehindMaster": "240729"
}
}
]
}
]
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15498/viewspace-2894379/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- tidb之dm叢集同步異常處理TiDB
- DM 是如何處理 DML 的丨TiDB 工具分享TiDB
- TIDB DM資料同步step by stepTiDB
- Mysql自動處理同步報錯MySql
- TIDB DM資料同步工具安裝部署TiDB
- 線上MYSQL同步報錯故障處理方法總結MySql
- mysqlconnect bug 處理一例。MySql
- Redis4.0從庫複製報錯"master_link_status:down"處理一例RedisAST
- ibbackup恢復報錯一例
- Gulp壓縮報錯處理
- rails gem報錯的處理AI
- 小程式 · 報錯:Error: errCode: -501007 ,errMsg: Invalid Key Name (__keyPath)Error
- DM 原始碼閱讀系列文章(三)資料同步處理單元介紹原始碼
- Python 入門級報錯處理Python
- Too many open files報錯處理
- keepalived啟動報錯解決一例
- 非同步流程處理非同步
- 非同步處理方法非同步
- JavaScript | 非同步處理JavaScript非同步
- [20190718]12c壞塊處理一例.txt
- 錯誤處理
- 多種方式告訴你如何計算DM同步資料到TiDB的延時時間TiDB
- tidb dm叢集修改某個dm-worker的儲存目錄TiDB
- js中非同步處理JS非同步
- Laravel 事件&非同步處理Laravel事件非同步
- Oracle 12c ORA-29548 報錯處理Oracle
- ora-04045和ora-16000報錯處理
- Rman報錯ORA-00234: ORA-00202處理
- TiDB故障處理之讓人迷惑的Region is UnavailableTiDBAI
- QT執行緒同步與非同步處理QT執行緒非同步
- Python錯誤處理Python
- PHP 錯誤處理PHP
- php錯誤處理PHP
- Go 錯誤處理Go
- DeferredResult——非同步請求處理非同步
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- Vue init webpack xxxx project 報錯處理(connect ETIMEDOUT 192.30.253.112)VueWebProject
- exp匯出報錯EXP-00106問題處理