【 TiDB 使用环境】测试/ Poc
【 TiDB 版本】6.5.8
【复现路径】K8S 1.23 使用TiOperator部署
【遇到的问题】PD经常启动失败
【资源配置】
【附件:截图/日志/监控】
cluster-2:~ # kubectl logs -f -n namespace basic-pd-0
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local
Name: basic-pd-0.basic-pd-peer.namespace.svc
Address 1: 100.66.32.25 basic-pd-0.basic-pd-peer.namespace.svc.cluster.local
nslookup domain basic-pd-0.basic-pd-peer.namespace.svc.svc success
starting pd-server …
/pd-server --data-dir=/var/lib/pd --name=basic-pd-0 --peer-urls=http://0.0.0.0:2380 --advertise-peer-urls=http://basic-pd-0.basic-pd-peer.namespace.svc:2380 --client-urls=http://0.0.0.0:2379 --advertise-client-urls=http://basic-pd-0.basic-pd-peer.namespace.svc:2379 --config=/etc/pd/pd.toml --join=http://basic-pd-2.basic-pd-peer.namespace.svc:2380,http://basic-pd-1.basic-pd-peer.namespace.svc:2380,http://basic-pd-0.basic-pd-peer.namespace.svc:2380/
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:43] [“Welcome to Placement Driver (PD)”]
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:44] [PD] [release-version=v6.5.8]
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:45] [PD] [edition=Community]
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:46] [PD] [git-hash=4506d63ba4fba7123ecc8277da7ef5f635efee90]
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:47] [PD] [git-branch=heads/refs/tags/v6.5.8]
[2024/09/03 10:14:42.281 +00:00] [INFO] [util.go:48] [PD] [utc-build-time=“2024-01-25 10:03:20”]
[2024/09/03 10:14:42.281 +00:00] [INFO] [metricutil.go:83] [“disable Prometheus push client”]
[2024/09/03 10:14:42.281 +00:00] [INFO] [server.go:253] [“PD Config”] [config=“{"client-urls":"http://0.0.0.0:2379","peer-urls":"http://0.0.0.0:2380","advertise-client-urls":"http://basic-pd-0.basic-pd-peer.namespace.svc:2379","advertise-peer-urls":"http://basic-pd-0.basic-pd-peer.namespace.svc:2380","name":"basic-pd-0","data-dir":"/var/lib/pd","force-new-cluster":false,"enable-grpc-gateway":true,"initial-cluster":"basic-pd-2=http://basic-pd-2.basic-pd-peer.namespace.svc:2380,basic-pd-1=http://basic-pd-1.basic-pd-peer.namespace.svc:2380,basic-pd-0=http://basic-pd-0.basic-pd-peer.namespace.svc:2380/\“,\“initial-cluster-state\”:\“existing\”,\“initial-cluster-token\”:\“pd-cluster\”,\“join\”:\“http://basic-pd-2.basic-pd-peer.namespace.svc:2380,http://basic-pd-1.basic-pd-peer.namespace.svc:2380,http://basic-pd-0.basic-pd-peer.namespace.svc:2380/\”,\“lease\”:3,\“log\”:{\“level\”:\“info\”,\“format\”:\“text\”,\“disable-timestamp\”:false,\“file\”:{\“filename\”:\”\“,\“max-size\”:0,\“max-days\”:0,\“max-backups\”:0},\“development\”:false,\“disable-caller\”:false,\“disable-stacktrace\”:false,\“disable-error-verbose\”:true,\“sampling\”:null,\“error-output-path\”:\”\“},\“tso-save-interval\”:\“3s\”,\“tso-update-physical-interval\”:\“50ms\”,\“enable-local-tso\”:false,\“metric\”:{\“job\”:\“basic-pd-0\”,\“address\”:\”\“,\“interval\”:\“15s\”},\“schedule\”:{\“max-snapshot-count\”:64,\“max-pending-peer-count\”:64,\“max-merge-region-size\”:20,\“max-merge-region-keys\”:0,\“split-merge-interval\”:\“1h0m0s\”,\“swtich-witness-interval\”:\“1h0m0s\”,\“enable-one-way-merge\”:\“false\”,\“enable-cross-table-merge\”:\“true\”,\“patrol-region-interval\”:\“10ms\”,\“max-store-down-time\”:\“30m0s\”,\“max-store-preparing-time\”:\“48h0m0s\”,\“leader-schedule-limit\”:4,\“leader-schedule-policy\”:\“count\”,\“region-schedule-limit\”:2048,\“replica-schedule-limit\”:64,\“merge-schedule-limit\”:8,\“hot-region-schedule-limit\”:4,\“hot-region-cache-hits-threshold\”:3,\“store-limit\”:{},\“tolerant-size-ratio\”:0,\“low-space-ratio\”:0.8,\“high-space-ratio\”:0.7,\“region-score-formula-version\”:\“v2\”,\“scheduler-max-waiting-operator\”:5,\“enable-remove-down-replica\”:\“true\”,\“enable-replace-offline-replica\”:\“true\”,\“enable-make-up-replica\”:\“true\”,\“enable-remove-extra-replica\”:\“true\”,\“enable-location-replacement\”:\“true\”,\“enable-debug-metrics\”:\“false\”,\“enable-joint-consensus\”:\“true\”,\“enable-tikv-split-region\”:\“true\”,\“schedulers-v2\”:[{\“type\”:\“balce-region\”,\“args\”:null,\“disable\”:false,\“args-payload\”:\”\“},{\“type\”:\“balce-leader\”,\“args\”:null,\“disable\”:false,\“args-payload\”:\”\“},{\“type\”:\“hot-region\”,\“args\”:null,\“disable\”:false,\“args-payload\”:\”\“},{\“type\”:\“split-bucket\”,\“args\”:null,\“disable\”:false,\“args-payload\”:\”\“}],\“schedulers-payload\”:null,\“store-limit-mode\”:\“manual\”,\“hot-regions-write-interval\”:\“10m0s\”,\“hot-regions-reserved-days\”:7,\“enable-diagnostic\”:\“false\”,\“enable-witness\”:\“false\”},\“replication\”:{\“max-replicas\”:3,\“location-labels\”:\”\“,\“strictly-match-label\”:\“false\”,\“enable-placement-rules\”:\“true\”,\“enable-placement-rules-cache\”:\“false\”,\“isolation-level\”:\”\“},\“pd-server\”:{\“use-region-storage\”:\“true\”,\“max-gap-reset-ts\”:\“24h0m0s\”,\“key-type\”:\“table\”,\“runtime-services\”:\”\“,\“metric-storage\”:\”\“,\“dashboard-address\”:\“auto\”,\“trace-region-flow\”:\“true\”,\“flow-round-by-digit\”:3,\“min-resolved-ts-persistence-interval\”:\“1s\”},\“cluster-version\”:\“0.0.0\”,\“labels\”:{},\“quota-backend-bytes\”:\“8GiB\”,\“auto-compaction-mode\”:\“periodic\”,\“auto-compaction-retention-v2\”:\“1h\”,\“TickInterval\”:\“500ms\”,\“ElectionInterval\”:\“3s\”,\“PreVote\”:true,\“max-request-bytes\”:157286400,\“security\”:{\“cacert-path\”:\”\“,\“cert-path\”:\”\“,\“key-path\”:\”\“,\“cert-allowed-cn\”:null,\“SSLCABytes\”:null,\“SSLCertBytes\”:null,\“SSLKEYBytes\”:null,\“redact-info-log\”:false,\“encryption\”:{\“data-encryption-method\”:\“plaintext\”,\“data-key-rotation-period\”:\“168h0m0s\”,\“master-key\”:{\“type\”:\“plaintext\”,\“key-id\”:\”\“,\“region\”:\”\“,\“endpoint\”:\”\“,\“path\”:\”\“}}},\“label-property\”:null,\“WarningMsgs\”:null,\“DisableStrictReconfigCheck\”:false,\“HeartbeatStreamBindInterval\”:\“1m0s\”,\“LeaderPriorityCheckInterval\”:\“1m0s\”,\“dashboard\”:{\“tidb-cacert-path\”:\”\“,\“tidb-cert-path\”:\”\“,\“tidb-key-path\”:\”\“,\“public-path-prefix\”:\”\“,\“internal-proxy\”:false,\“enable-telemetry\”:false,\“enable-experimental\”:false},\“replication-mode\”:{\“replication-mode\”:\“majority\”,\“dr-auto-sync\”:{\“label-key\”:\”\“,\“primary\”:\”\“,\“dr\”:\”\“,\“primary-replicas\”:0,\“dr-replicas\”:0,\“wait-store-timeout\”:\“1m0s\”,\“pause-region-split\”:\“false\”}}}”]
[2024/09/03 10:14:42.289 +00:00] [INFO] [server.go:228] [“register REST path”] [path=/pd/api/v1]
[2024/09/03 10:14:42.289 +00:00] [INFO] [server.go:228] [“register REST path”] [path=/pd/api/v2/]
[2024/09/03 10:14:42.289 +00:00] [INFO] [server.go:228] [“register REST path”] [path=/autoscaling]
[2024/09/03 10:14:42.289 +00:00] [INFO] [distro.go:51] [“Using distribution strings”] [strings={}]
[2024/09/03 10:14:42.292 +00:00] [INFO] [server.go:228] [“register REST path”] [path=/dashboard/api/]
[2024/09/03 10:14:42.292 +00:00] [INFO] [server.go:228] [“register REST path”] [path=/dashboard/]
[2024/09/03 10:14:42.293 +00:00] [INFO] [etcd.go:117] [“configuring peer listeners”] [listen-peer-urls=”[http://0.0.0.0:2380]“]
[2024/09/03 10:14:42.293 +00:00] [INFO] [systimemon.go:30] [“start system time monitor”]
[2024/09/03 10:14:42.293 +00:00] [INFO] [etcd.go:127] [“configuring client listeners”] [listen-client-urls=”[http://0.0.0.0:2379]“]
[2024/09/03 10:14:42.293 +00:00] [INFO] [etcd.go:611] [“pprof is enabled”] [path=/debug/pprof]
[2024/09/03 10:14:42.294 +00:00] [INFO] [etcd.go:369] [“closing etcd server”] [name=basic-pd-0] [data-dir=/var/lib/pd] [advertise-peer-urls=”[http://basic-pd-0.basic-pd-peer.namespace.svc:2380]“] [advertise-client-urls=”[http://basic-pd-0.basic-pd-peer.namespace.svc:2379]“]
[2024/09/03 10:14:42.294 +00:00] [INFO] [etcd.go:373] [“closed etcd server”] [name=basic-pd-0] [data-dir=/var/lib/pd] [advertise-peer-urls=”[http://basic-pd-0.basic-pd-peer.namespace.svc:2380]“] [advertise-client-urls=”[http://basic-pd-0.basic-pd-peer.namespace.svc:2379]“]
[2024/09/03 10:14:42.294 +00:00] [FATAL] [main.go:120] [“run server failed”] [error=”[PD:etcd:ErrStartEtcd]error setting up initial cluster: URL must not contain a path: http://basic-pd-0.basic-pd-peer.namespace.svc:2380/: error setting up initial cluster: URL must not contain a path: http://basic-pd-0.basic-pd-peer.namespace.svc:2380/"] [stack=“main.main\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:120\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250”]
有没有大神回答下,后面这个报错的原因,我看了正常启动的时候,join的成员是3个啊。为啥说不能包含自己。