【 TiDB 使用环境】生产环境
【 TiDB 版本】
v7.1.5
【复现路径】做过哪些操作出现的问题
用dumpling备份一个表的匹配数据到s3,遇到了报错如下:
[tidb@b67 ~]$ export AWS_ACCESS_KEY_ID=tidb-snapshots-user
[tidb@b67 ~]$ export AWS_SECRET_ACCESS_KEY=Udx5xxRXNWZbxxx
[tidb@b67 ~]$
[tidb@b67 ~]$ ~/tidb-toolkit/dumpling -u root -p 'PEsCePtMxxxxxxxx' -P 4000 -h 192.168.241.85 -T bsppr.xpost --where "update_time < '2023-03-01 00:00:00'" -o "s3://tidb-snapshots/dumpling?endpoint=http://oss.api.private"
Release version: v7.1.5
Git commit hash: caa60c0917a886933a525d25e17057faac5b4da2
Git branch: HEAD
Build timestamp: 2024-04-24 11:09:23Z
Go version: go version go1.20.10 linux/amd64
[2024/11/12 11:42:23.046 +08:00] [INFO] [versions.go:54] ["Welcome to dumpling"] ["Release Version"=v7.1.5] ["Git Commit Hash"=caa60c0917a886933a525d25e17057faac5b4da2] ["Git Branch"=HEAD] ["Build timestamp"="2024-04-24 11:09:23"] ["Go Version"="go version go1.20.10 linux/amd64"]
[2024/11/12 11:42:23.106 +08:00] [INFO] [s3.go:403] ["succeed to get bucket region from s3"] ["bucket region"=us-east-1]
[2024/11/12 11:42:23.109 +08:00] [INFO] [version.go:434] ["detect server version"] [type=TiDB] [version=7.1.5]
[2024/11/12 11:42:23.124 +08:00] [INFO] [client.go:311] ["[pd] create pd client with endpoints and keyspace"] [pd-address="[192.168.241.60:2379,192.168.241.59:2379,192.168.241.61:2379]"] [keyspace-id=0]
[2024/11/12 11:42:23.131 +08:00] [INFO] [pd_service_discovery.go:521] ["[pd] update member urls"] [old-urls="[http://192.168.241.60:2379,http://192.168.241.59:2379,http://192.168.241.61:2379]"] [new-urls="[http://192.168.241.59:2379,http://192.168.241.60:2379,http://192.168.241.61:2379]"]
[2024/11/12 11:42:23.131 +08:00] [INFO] [pd_service_discovery.go:546] ["[pd] switch leader"] [new-leader=http://192.168.241.61:2379] [old-leader=]
[2024/11/12 11:42:23.131 +08:00] [INFO] [pd_service_discovery.go:177] ["[pd] init cluster id"] [cluster-id=7210697100626091534]
[2024/11/12 11:42:23.132 +08:00] [INFO] [client.go:386] ["[pd] changing service mode"] [old-mode=UNKNOWN_SVC_MODE] [new-mode=PD_SVC_MODE]
[2024/11/12 11:42:23.132 +08:00] [INFO] [tso_client.go:231] ["[tso] switch dc tso allocator serving address"] [dc-location=global] [new-address=http://192.168.241.61:2379]
[2024/11/12 11:42:23.133 +08:00] [INFO] [tso_dispatcher.go:296] ["[tso] tso dispatcher created"] [dc-location=global]
[2024/11/12 11:42:23.133 +08:00] [INFO] [client.go:428] ["[pd] service mode changed"] [old-mode=PD_SVC_MODE] [new-mode=PD_SVC_MODE]
[2024/11/12 11:42:23.134 +08:00] [INFO] [dump.go:1519] ["generate dumpling gc safePoint id"] [id=dumpling_1731382943134361831]
[2024/11/12 11:42:23.143 +08:00] [INFO] [dump.go:151] ["begin to run Dump"] [conf="{\"s3\":{\"endpoint\":\"http://oss.api.private\",\"region\":\"\",\"storage-class\":\"\",\"sse\":\"\",\"sse-kms-key-id\":\"\",\"acl\":\"\",\"access-key\":\"\",\"secret-access-key\":\"\",\"session-token\":\"\",\"provider\":\"\",\"force-path-style\":true,\"use-accelerate-endpoint\":false,\"role-arn\":\"\",\"external-id\":\"\",\"object-lock-enabled\":false},\"gcs\":{\"endpoint\":\"\",\"storage-class\":\"\",\"predefined-acl\":\"\",\"credentials-file\":\"\"},\"azblob\":{\"endpoint\":\"\",\"account-name\":\"\",\"account-key\":\"\",\"access-tier\":\"\"},\"AllowCleartextPasswords\":false,\"SortByPk\":true,\"NoViews\":true,\"NoSequences\":true,\"NoHeader\":false,\"NoSchemas\":false,\"NoData\":false,\"CompleteInsert\":false,\"TransactionalConsistency\":true,\"EscapeBackslash\":true,\"DumpEmptyDatabase\":true,\"PosAfterConnect\":false,\"CompressType\":0,\"Host\":\"192.168.241.85\",\"Port\":4000,\"Threads\":4,\"User\":\"root\",\"Security\":{\"CAPath\":\"\",\"CertPath\":\"\",\"KeyPath\":\"\"},\"LogLevel\":\"info\",\"LogFile\":\"\",\"LogFormat\":\"text\",\"OutputDirPath\":\"s3://tidb-snapshots/dumpling?endpoint=http://oss.api.private\",\"StatusAddr\":\":8281\",\"Snapshot\":\"453871650240462857\",\"Consistency\":\"snapshot\",\"CsvNullValue\":\"\\\\N\",\"SQL\":\"\",\"CsvSeparator\":\",\",\"CsvDelimiter\":\"\\\"\",\"Databases\":[],\"Where\":\"update_time \\u003c '2023-03-01 00:00:00'\",\"FileType\":\"sql\",\"ServerInfo\":{\"ServerType\":3,\"ServerVersion\":\"7.1.5\",\"HasTiKV\":true},\"Rows\":0,\"ReadTimeout\":900000000000,\"TiDBMemQuotaQuery\":0,\"FileSize\":0,\"StatementSize\":1000000,\"SessionParams\":{\"tidb_snapshot\":\"453871650240462857\"},\"Tables\":{\"bsppr\":[{\"Name\":\"xpost\",\"AvgRowLength\":0,\"Type\":0}]},\"CollationCompatible\":\"loose\",\"IOTotalBytes\":null,\"Net\":\"\"}"]
[2024/11/12 11:42:23.169 +08:00] [WARN] [s3.go:1059] ["failed to request s3, retrying"] [error="SerializationError: failed to unmarshal error message\n\tstatus code: 403, request id: , host id: \ncaused by: UnmarshalError: failed to unmarshal error message\n\t00000000 3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 3c 74 |<html>..<head><t|\n00000010 69 74 6c 65 3e 34 30 33 20 46 6f 72 62 69 64 64 |itle>403 Forbidd|\n00000020 65 6e 3c 2f 74 69 74 6c 65 3e 3c 2f 68 65 61 64 |en</title></head|\n00000030 3e 0d 0a 3c 62 6f 64 79 3e 0d 0a 3c 63 65 6e 74 |>..<body>..<cent|\n00000040 65 72 3e 3c 68 31 3e 34 30 33 20 46 6f 72 62 69 |er><h1>403 Forbi|\n00000050 64 64 65 6e 3c 2f 68 31 3e 3c 2f 63 65 6e 74 65 |dden</h1></cente|\n00000060 72 3e 0d 0a 3c 68 72 3e 3c 63 65 6e 74 65 72 3e |r>..<hr><center>|\n00000070 6f 70 65 6e 72 65 73 74 79 2f 31 2e 31 35 2e 38 |openresty/1.15.8|\n00000080 2e 31 3c 2f 63 65 6e 74 65 72 3e 0d 0a 3c 2f 62 |.1</center>..</b|\n00000090 6f 64 79 3e 0d 0a 3c 2f 68 74 6d 6c 3e 0d 0a |ody>..</html>..|\n\ncaused by: expected element type <Error> but have <html>"] [backoff=1.892388137s]
[2024/11/12 11:42:25.064 +08:00] [WARN] [s3.go:1059] ["failed to request s3, retrying"] [error="SerializationError: failed to unmarshal error message\n\tstatus code: 403, request id: , host id: \ncaused by: UnmarshalError: failed to unmarshal error message\n\t00000000 3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 3c 74 |<html>..<head><t|\n00000010 69 74 6c 65 3e 34 30 33 20 46 6f 72 62 69 64 64 |itle>403 Forbidd|\n00000020 65 6e 3c 2f 74 69 74 6c 65 3e 3c 2f 68 65 61 64 |en</title></head|\n00000030 3e 0d 0a 3c 62 6f 64 79 3e 0d 0a 3c 63 65 6e 74 |>..<body>..<cent|\n00000040 65 72 3e 3c 68 31 3e 34 30 33 20 46 6f 72 62 69 |er><h1>403 Forbi|\n00000050 64 64 65 6e 3c 2f 68 31 3e 3c 2f 63 65 6e 74 65 |dden</h1></cente|\n00000060 72 3e 0d 0a 3c 68 72 3e 3c 63 65 6e 74 65 72 3e |r>..<hr><center>|\n00000070 6f 70 65 6e 72 65 73 74 79 2f 31 2e 31 35 2e 38 |openresty/1.15.8|\n00000080 2e 31 3c 2f 63 65 6e 74 65 72 3e 0d 0a 3c 2f 62 |.1</center>..</b|\n00000090 6f 64 79 3e 0d 0a 3c 2f 68 74 6d 6c 3e 0d 0a |ody>..</html>..|\n\ncaused by: expected element type <Error> but have <html>"] [backoff=2.160264182s]
[2024/11/12 11:42:27.226 +08:00] [WARN] [s3.go:1059] ["failed to request s3, retrying"] [error="SerializationError: failed to unmarshal error message\n\tstatus code: 403, request id: , host id: \ncaused by: UnmarshalError: failed to unmarshal error message\n\t00000000 3c 68 74 6d 6c 3e 0d 0a 3c 68 65 61 64 3e 3c 74 |<html>..<head><t|\n00000010 69 74 6c 65 3e 34 30 33 20 46 6f 72 62 69 64 64 |itle>403 Forbidd|\n00000020 65 6e 3c 2f 74 69 74 6c 65 3e 3c 2f 68 65 61 64 |en</title></head|\n00000030 3e 0d 0a 3c 62 6f 64 79 3e 0d 0a 3c 63 65 6e 74 |>..<body>..<cent|\n00000040 65 72 3e 3c 68 31 3e 34 30 33 20 46 6f 72 62 69 |er><h1>403 Forbi|\n00000050 64 64 65 6e 3c 2f 68 31 3e 3c 2f 63 65 6e 74 65 |dden</h1></cente|\n00000060 72 3e 0d 0a 3c 68 72 3e 3c 63 65 6e 74 65 72 3e |r>..<hr><center>|\n00000070 6f 70 65 6e 72 65 73 74 79 2f 31 2e 31 35 2e 38 |openresty/1.15.8|\n00000080 2e 31 3c 2f 63 65 6e 74 65 72 3e 0d 0a 3c 2f 62 |.1</center>..</b|\n00000090 6f 64 79 3e 0d 0a 3c 2f 68 74 6d 6c 3e 0d 0a |ody>..</html>..|\n\ncaused by: expected element type <Error> but have <html>"] [backoff=7.354509796s]