tidb容器化部署时的增量备份

  • 【TiDB 版本】:latest
  • 【问题描述】:用docker部署tidb之后,使用配置文件启动,并未成功开启binlog

docker run -d --name tidb
-p 4000:4000
-p 10080:10080
–log-opt max-size=500m
-v /etc/localtime:/etc/localtime:ro
-v /data/tidb/tidb.toml:/tidb.toml:ro
pingcap/tidb:latest
–store=tikv
–path=“127.0.0.1:2379”
–config="/tidb.toml"

tidb.toml 文件位置: /data/tidb/ 文件内容: enable_binlog = 1

tidb.toml 是你那里指定的参数文件,请先确认下该配置文件是否存在。该文件是 tidb server 的 参数文件

启动pump,异常如下: 2020/01/14 15:40:29 main.go:59: [error] pump server error, fail to notify all living drainer: notify drainer(ip:8249); but return error(rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = “transport: Error while dialing dial tcp ip:8249: connect: connection refused”)

drainer的状态正常 State: online

请验证下 pump 到 drainer 的网络是否通畅,如使用 telnet ip port

他们是在同一台服务器上部署的

1、请 ps -ef 看下 drainer 进程的状态

2、请上传 pump 以及 drainer 日志

目前pump和drainer服务都跑起来了。 但是只要我一操作数据库,删除一条记录,drainer就自动退出,也没有打印出异常日志。 完整的日志如下:

INFO[0000] [pd] create pd client with endpoints [http://ip:2379] INFO[0000] [pd] leader switches to: http://ip:2379, previous:
INFO[0000] [pd] init cluster id 6620555524581998465
INFO[0000] new store
INFO[0000] [pd] create pd client with endpoints [ip:2379] INFO[0000] [pd] leader switches to: http://ip:2379, previous:
INFO[0000] [pd] init cluster id 6620555524581998465
WARN[0012] get timestamp too slow: 126.965432ms
You have new mail in /var/spool/mail/root

麻烦检查一下 pd 日志,看起来是 pd leader 发生了切换

该怎么处理呐

麻烦提供一下完整的 pd 日志

[2020/01/15 01:30:54.411 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=41909] [operator="“balance-leader (kind:leader,balance, region:41909(1325,11), createAt:2020-01-15 01:30:54.411464079 +0000 UTC m=+13192439.738255133, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.411 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=41909] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.421 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=38513] [from=4] [to=1] [2020/01/15 01:30:54.421 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=38513] [operator=”“balance-leader (kind:leader,balance, region:38513(835,11), createAt:2020-01-15 01:30:54.3707999 +0000 UTC m=+13192439.697591032, startAt:2020-01-15 01:30:54.370902297 +0000 UTC m=+13192439.697693426, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.421 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=44221] [from=4] [to=1] [2020/01/15 01:30:54.421 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=44221] [operator="“balance-leader (kind:leader,balance, region:44221(1749,11), createAt:2020-01-15 01:30:54.39111807 +0000 UTC m=+13192439.717909081, startAt:2020-01-15 01:30:54.391191724 +0000 UTC m=+13192439.717982758, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.421 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=42905] [operator="“balance-leader (kind:leader,balance, region:42905(1478,11), createAt:2020-01-15 01:30:54.421595255 +0000 UTC m=+13192439.748386412, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.421 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=42905] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.431 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=37583] [operator=”“balance-leader (kind:leader,balance, region:37583(678,11), createAt:2020-01-15 01:30:54.43169834 +0000 UTC m=+13192439.758489357, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.431 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=37583] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.457 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=44092] [from=4] [to=1] [2020/01/15 01:30:54.457 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=44092] [operator=”“balance-leader (kind:leader,balance, region:44092(1710,11), createAt:2020-01-15 01:30:54.401313912 +0000 UTC m=+13192439.728104893, startAt:2020-01-15 01:30:54.401447766 +0000 UTC m=+13192439.728238754, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.462 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=38985] [operator="“balance-leader (kind:leader,balance, region:38985(952,11), createAt:2020-01-15 01:30:54.462259539 +0000 UTC m=+13192439.789050613, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.462 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=38985] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.473 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=41909] [from=4] [to=1] [2020/01/15 01:30:54.473 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=41909] [operator=”“balance-leader (kind:leader,balance, region:41909(1325,11), createAt:2020-01-15 01:30:54.411464079 +0000 UTC m=+13192439.738255133, startAt:2020-01-15 01:30:54.411560023 +0000 UTC m=+13192439.738351082, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.474 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=42905] [from=4] [to=1] [2020/01/15 01:30:54.474 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=42905] [operator="“balance-leader (kind:leader,balance, region:42905(1478,11), createAt:2020-01-15 01:30:54.421595255 +0000 UTC m=+13192439.748386412, startAt:2020-01-15 01:30:54.421772594 +0000 UTC m=+13192439.748563853, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.474 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=37583] [from=4] [to=1] [2020/01/15 01:30:54.474 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=37583] [operator="“balance-leader (kind:leader,balance, region:37583(678,11), createAt:2020-01-15 01:30:54.43169834 +0000 UTC m=+13192439.758489357, startAt:2020-01-15 01:30:54.431765525 +0000 UTC m=+13192439.758556547, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.482 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=38129] [operator="“balance-leader (kind:leader,balance, region:38129(763,11), createAt:2020-01-15 01:30:54.482453565 +0000 UTC m=+13192439.809244551, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.482 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=38129] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.492 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=40105] [operator=”“balance-leader (kind:leader,balance, region:40105(1048,11), createAt:2020-01-15 01:30:54.492582129 +0000 UTC m=+13192439.819373121, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.492 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=40105] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.502 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=43257] [operator=”“balance-leader (kind:leader,balance, region:43257(1551,11), createAt:2020-01-15 01:30:54.502728971 +0000 UTC m=+13192439.829519961, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.502 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=43257] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.503 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=38985] [from=4] [to=1] [2020/01/15 01:30:54.503 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=38985] [operator=”“balance-leader (kind:leader,balance, region:38985(952,11), createAt:2020-01-15 01:30:54.462259539 +0000 UTC m=+13192439.789050613, startAt:2020-01-15 01:30:54.462381174 +0000 UTC m=+13192439.789172288, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.513 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=38709] [operator="“balance-leader (kind:leader,balance, region:38709(884,11), createAt:2020-01-15 01:30:54.512997015 +0000 UTC m=+13192439.839788059, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.513 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=38709] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.526 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=38129] [from=4] [to=1] [2020/01/15 01:30:54.526 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=38129] [operator=”“balance-leader (kind:leader,balance, region:38129(763,11), createAt:2020-01-15 01:30:54.482453565 +0000 UTC m=+13192439.809244551, startAt:2020-01-15 01:30:54.482510871 +0000 UTC m=+13192439.809301917, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.526 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=40105] [from=4] [to=1] [2020/01/15 01:30:54.526 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=40105] [operator="“balance-leader (kind:leader,balance, region:40105(1048,11), createAt:2020-01-15 01:30:54.492582129 +0000 UTC m=+13192439.819373121, startAt:2020-01-15 01:30:54.492642006 +0000 UTC m=+13192439.819433018, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.526 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=43257] [from=4] [to=1] [2020/01/15 01:30:54.526 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=43257] [operator="“balance-leader (kind:leader,balance, region:43257(1551,11), createAt:2020-01-15 01:30:54.502728971 +0000 UTC m=+13192439.829519961, startAt:2020-01-15 01:30:54.502791753 +0000 UTC m=+13192439.829582776, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.533 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=37619] [operator="“balance-leader (kind:leader,balance, region:37619(687,11), createAt:2020-01-15 01:30:54.533239542 +0000 UTC m=+13192439.860030551, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:30:54.533 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=37619] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:30:54.540 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=38709] [from=4] [to=1] [2020/01/15 01:30:54.540 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=38709] [operator=”“balance-leader (kind:leader,balance, region:38709(884,11), createAt:2020-01-15 01:30:54.512997015 +0000 UTC m=+13192439.839788059, startAt:2020-01-15 01:30:54.513084509 +0000 UTC m=+13192439.839875598, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.543 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=43177] [operator="“balance-leader (kind:leader,balance, region:43177(1540,11), createAt:2020-01-15 01:30:54.543387279 +0000 UTC m=+13192439.870178265, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:30:54.543 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=43177] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:30:54.553 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=21974] [operator=”“balance-leader (kind:leader,balance, region:21974(429,11), createAt:2020-01-15 01:30:54.553611524 +0000 UTC m=+13192439.880402580, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:30:54.553 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=21974] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:30:54.563 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=40445] [operator=”“balance-leader (kind:leader,balance, region:40445(1122,11), createAt:2020-01-15 01:30:54.563675694 +0000 UTC m=+13192439.890466681, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:30:54.563 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=40445] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:30:54.582 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=37619] [from=4] [to=6] [2020/01/15 01:30:54.582 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=37619] [operator=”“balance-leader (kind:leader,balance, region:37619(687,11), createAt:2020-01-15 01:30:54.533239542 +0000 UTC m=+13192439.860030551, startAt:2020-01-15 01:30:54.533338625 +0000 UTC m=+13192439.860129745, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:30:54.582 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=43177] [from=4] [to=6] [2020/01/15 01:30:54.582 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=43177] [operator="“balance-leader (kind:leader,balance, region:43177(1540,11), createAt:2020-01-15 01:30:54.543387279 +0000 UTC m=+13192439.870178265, startAt:2020-01-15 01:30:54.543445887 +0000 UTC m=+13192439.870236900, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:30:54.590 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=21974] [from=4] [to=6] [2020/01/15 01:30:54.590 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=21974] [operator="“balance-leader (kind:leader,balance, region:21974(429,11), createAt:2020-01-15 01:30:54.553611524 +0000 UTC m=+13192439.880402580, startAt:2020-01-15 01:30:54.553736671 +0000 UTC m=+13192439.880527769, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:30:54.590 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=40445] [from=4] [to=6] [2020/01/15 01:30:54.590 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=40445] [operator="“balance-leader (kind:leader,balance, region:40445(1122,11), createAt:2020-01-15 01:30:54.563675694 +0000 UTC m=+13192439.890466681, startAt:2020-01-15 01:30:54.563737911 +0000 UTC m=+13192439.890528902, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:30:54.594 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=36759] [operator="“balance-leader (kind:leader,balance, region:36759(486,11), createAt:2020-01-15 01:30:54.594162343 +0000 UTC m=+13192439.920953361, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.594 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=36759] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.604 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=37027] [operator=”“balance-leader (kind:leader,balance, region:37027(553,11), createAt:2020-01-15 01:30:54.604317421 +0000 UTC m=+13192439.931108418, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.604 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=37027] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.614 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=38753] [operator=”“balance-leader (kind:leader,balance, region:38753(895,11), createAt:2020-01-15 01:30:54.614540288 +0000 UTC m=+13192439.941331383, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 1]) “”] [2020/01/15 01:30:54.614 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=38753] [step=“transfer leader from store 4 to store 1”] [source=create] [2020/01/15 01:30:54.620 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=36759] [from=4] [to=1] [2020/01/15 01:30:54.620 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=36759] [operator=”“balance-leader (kind:leader,balance, region:36759(486,11), createAt:2020-01-15 01:30:54.594162343 +0000 UTC m=+13192439.920953361, startAt:2020-01-15 01:30:54.594244589 +0000 UTC m=+13192439.921035673, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.624 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=44389] [operator="“balance-leader (kind:leader,balance, region:44389(1763,11), createAt:2020-01-15 01:30:54.624811454 +0000 UTC m=+13192439.951602460, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:30:54.624 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=44389] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:30:54.635 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=37027] [from=4] [to=1] [2020/01/15 01:30:54.635 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=37027] [operator=”“balance-leader (kind:leader,balance, region:37027(553,11), createAt:2020-01-15 01:30:54.604317421 +0000 UTC m=+13192439.931108418, startAt:2020-01-15 01:30:54.604399389 +0000 UTC m=+13192439.931190424, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.636 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=38753] [from=4] [to=1] [2020/01/15 01:30:54.636 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=38753] [operator="“balance-leader (kind:leader,balance, region:38753(895,11), createAt:2020-01-15 01:30:54.614540288 +0000 UTC m=+13192439.941331383, startAt:2020-01-15 01:30:54.614644211 +0000 UTC m=+13192439.941435330, currentStep:1, steps:[transfer leader from store 4 to store 1]) finished”"] [2020/01/15 01:30:54.679 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=44389] [from=4] [to=6] [2020/01/15 01:30:54.679 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=44389] [operator="“balance-leader (kind:leader,balance, region:44389(1763,11), createAt:2020-01-15 01:30:54.624811454 +0000 UTC m=+13192439.951602460, startAt:2020-01-15 01:30:54.624881447 +0000 UTC m=+13192439.951672482, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:31:04.344 +00:00] [INFO] [periodic.go:135] [“starting auto periodic compaction”] [revision=12886838] [compact-period=1h0m0s] [2020/01/15 01:31:04.350 +00:00] [INFO] [index.go:190] [“compact tree index”] [revision=12886838] [2020/01/15 01:31:04.356 +00:00] [INFO] [periodic.go:146] [“completed auto periodic compaction”] [revision=12886838] [compact-period=1h0m0s] [took=1h0m0.014330785s] [2020/01/15 01:31:04.468 +00:00] [INFO] [kvstore_compaction.go:57] [“finished scheduled compaction”] [compact-revision=12886838] [took=111.249229ms] [2020/01/15 01:34:00.845 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413938834299682816] [2020/01/15 01:34:46.530 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=40309] [operator="“transfer-hot-read-leader (kind:leader,hot-region, region:40309(631,11), createAt:2020-01-15 01:34:46.530972186 +0000 UTC m=+13192671.857763265, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:34:46.531 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=40309] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:34:46.552 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=40309] [from=4] [to=6] [2020/01/15 01:34:46.552 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=40309] [operator=”“transfer-hot-read-leader (kind:leader,hot-region, region:40309(631,11), createAt:2020-01-15 01:34:46.530972186 +0000 UTC m=+13192671.857763265, startAt:2020-01-15 01:34:46.531169353 +0000 UTC m=+13192671.857960523, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:34:51.531 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=42397] [operator="“transfer-hot-read-leader (kind:leader,hot-region, region:42397(633,11), createAt:2020-01-15 01:34:51.531175014 +0000 UTC m=+13192676.857966167, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:34:51.531 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=42397] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:34:51.549 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=42397] [from=4] [to=6] [2020/01/15 01:34:51.549 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=42397] [operator=”“transfer-hot-read-leader (kind:leader,hot-region, region:42397(633,11), createAt:2020-01-15 01:34:51.531175014 +0000 UTC m=+13192676.857966167, startAt:2020-01-15 01:34:51.531374655 +0000 UTC m=+13192676.858165783, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:34:51.551 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=37343] [operator="“transfer-hot-read-leader (kind:leader,hot-region, region:37343(639,11), createAt:2020-01-15 01:34:51.551446168 +0000 UTC m=+13192676.878237232, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 4 to store 6]) “”] [2020/01/15 01:34:51.551 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=37343] [step=“transfer leader from store 4 to store 6”] [source=create] [2020/01/15 01:34:51.571 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=37343] [from=4] [to=6] [2020/01/15 01:34:51.571 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=37343] [operator=”“transfer-hot-read-leader (kind:leader,hot-region, region:37343(639,11), createAt:2020-01-15 01:34:51.551446168 +0000 UTC m=+13192676.878237232, startAt:2020-01-15 01:34:51.551559487 +0000 UTC m=+13192676.878350571, currentStep:1, steps:[transfer leader from store 4 to store 6]) finished”"] [2020/01/15 01:38:29.643 +00:00] [INFO] [operator_controller.go:285] [“add operator”] [region-id=42397] [operator="“transfer-hot-read-leader (kind:leader,hot-region, region:42397(633,11), createAt:2020-01-15 01:38:29.643269247 +0000 UTC m=+13192894.970060456, startAt:0001-01-01 00:00:00 +0000 UTC, currentStep:0, steps:[transfer leader from store 6 to store 1]) “”] [2020/01/15 01:38:29.643 +00:00] [INFO] [operator_controller.go:387] [“send schedule command”] [region-id=42397] [step=“transfer leader from store 6 to store 1”] [source=create] [2020/01/15 01:38:29.667 +00:00] [INFO] [cluster.go:368] [“leader changed”] [region-id=42397] [from=6] [to=1] [2020/01/15 01:38:29.667 +00:00] [INFO] [operator_controller.go:100] [“operator finish”] [region-id=42397] [operator=”“transfer-hot-read-leader (kind:leader,hot-region, region:42397(633,11), createAt:2020-01-15 01:38:29.643269247 +0000 UTC m=+13192894.970060456, startAt:2020-01-15 01:38:29.643522957 +0000 UTC m=+13192894.970314109, currentStep:1, steps:[transfer leader from store 6 to store 1]) finished”"] [2020/01/15 01:44:00.876 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413938991599190016] [2020/01/15 01:54:00.774 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413939148872482816] [2020/01/15 02:04:00.768 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413939306158882816] [2020/01/15 02:14:00.767 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413939463458390016] [2020/01/15 02:24:00.832 +00:00] [INFO] [grpc_service.go:701] [“updated gc safe point”] [safe-point=413939620731682816] [2020/01/15 02:31:04.358 +00:00] [INFO] [periodic.go:135] [“starting auto periodic compaction”] [revision=12890565] [compact-period=1h0m0s] [2020/01/15 02:31:04.365 +00:00] [INFO] [index.go:190] [“compact tree index”] [revision=12890565] [2020/01/15 02:31:04.371 +00:00] [INFO] [periodic.go:146] [“completed auto periodic compaction”] [revision=12890565] [compact-period=1h0m0s] [took=1h0m0.014252656s] [2020/01/15 02:31:04.483 +00:00] [INFO] [kvstore_compaction.go:57] [“finished scheduled compaction”] [compact-revision=12890565] [took=112.249577ms]

我现在启动draniner 大概5秒之后,自动就关了 ./tidb-v2.1.12-linux-amd64/bin/drainer -config drainer.toml -initial-commit-ts 413917297951899649 INFO[0000] [pd] create pd client with endpoints [http://ip:2379] INFO[0000] [pd] leader switches to: http://ip:2379, previous:
INFO[0000] [pd] init cluster id 6620555524581998465
INFO[0000] new store
INFO[0000] [pd] create pd client with endpoints [ip:2379] INFO[0000] [pd] leader switches to: http://ip:2379, previous:
INFO[0000] [pd] init cluster id 6620555524581998465
You have new mail in /var/spool/mail/root

请问这是三个 pd 节点所有的日志吗?

我用docker安装的,只有一个pd节点

在帖子上回复,效率太低了,可以加个好友吗?后续我把原因整理到帖子上

dranier上的错误日志是

2020/01/15 10:55:13 server.go:253: [error] syncer exited, error table 0 not found

我在drainer上配置,只备份wdtest schema

replicate-do-db = [“wdtest”]

你的 tidb 是 4.0 版本的,pump 和 draiber 是 2.1.12 版本的

目前最新稳定版本是 v3.0.8 ,4.0 还未正式发布,所以建议这边统一部署成3.0.8 版本试下