diff --git a/cmd/tidb-dashboard/main.go b/cmd/tidb-dashboard/main.go index f0be488058..d0dce2d02b 100644 --- a/cmd/tidb-dashboard/main.go +++ b/cmd/tidb-dashboard/main.go @@ -98,9 +98,6 @@ func NewCLIConfig() *DashboardCLIConfig { } cfg.CoreConfig.NormalizePublicPathPrefix() - if err := cfg.CoreConfig.NormalizePDEndPoint(); err != nil { - log.Fatal("Invalid PD Endpoint", zap.Error(err)) - } // setup TLS config for TiDB components if len(*clusterCaPath) != 0 && len(*clusterCertPath) != 0 && len(*clusterKeyPath) != 0 { @@ -113,6 +110,10 @@ func NewCLIConfig() *DashboardCLIConfig { cfg.CoreConfig.TiDBTLSConfig = buildTLSConfig(tidbCaPath, tidbKeyPath, tidbCertPath) } + if err := cfg.CoreConfig.NormalizePDEndPoint(); err != nil { + log.Fatal("Invalid PD Endpoint", zap.Error(err)) + } + // keyvisual check startTime := cfg.KVFileStartTime endTime := cfg.KVFileEndTime