pingcap / tidb-dashboard

A Web UI for monitoring, diagnosing and managing the TiDB cluster.
https://docs.pingcap.com/tidb/stable/dashboard-intro
Apache License 2.0
173 stars 126 forks source link

Independent Dashboard in Kubernetes failed to connect to server, and unwanted redirect using pd's dashboard. #1671

Closed Murasame233 closed 2 months ago

Murasame233 commented 2 months ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

What did you do?

I accessed the default dashboard in pd, and expose it to public network by ingress, and when I access it will redirect me to http://{name of cluster}-pd-0.{name of cluster}-pd-peer.tikv.svc:2379/dashboard/ I cannot find any way to resolve this problem so I try use independent dashboard.

And It shows

截屏2024-04-21 18 36 14

I opened developer tools in chrome.

截屏2024-04-21 18 38 49

Response below

{
    "error": true,
    "message": "Invalid Semantic Version",
    "code": "common.internal",
    "full_text": "Invalid Semantic Version\n at github.com/pingcap/tidb-dashboard/util/rest.Error()\n\t/go/src/github.com/pingcap/tidb-dashboard/util/rest/context_helpers.go:19\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/info.(*Service).infoHandler()\n\t/go/src/github.com/pingcap/tidb-dashboard/pkg/apiserver/info/info.go:86\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165\n at github.com/pingcap/tidb-dashboard/util/rest.ErrorHandlerFn.func1()\n\t/go/src/github.com/pingcap/tidb-dashboard/util/rest/error.go:70\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165\n at github.com/gin-contrib/gzip.Gzip.func2()\n\t/go/pkg/mod/github.com/gin-contrib/gzip@v0.0.1/gzip.go:47\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165\n at github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/recovery.go:99\n at github.com/gin-gonic/gin.(*Context).Next()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/context.go:165\n at github.com/gin-gonic/gin.(*Engine).handleHTTPRequest()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:489\n at github.com/gin-gonic/gin.(*Engine).ServeHTTP()\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.7.4/gin.go:445\n at github.com/pingcap/tidb-dashboard/pkg/apiserver.(*Service).handler()\n\t/go/src/github.com/pingcap/tidb-dashboard/pkg/apiserver/apiserver.go:244\n at net/http.HandlerFunc.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2109\n at github.com/pingcap/tidb-dashboard/pkg/utils.(*ServiceStatus).NewStatusAwareHandler.func1()\n\t/go/src/github.com/pingcap/tidb-dashboard/pkg/utils/service_status.go:67\n at net/http.HandlerFunc.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2109\n at net/http.(*ServeMux).ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2487\n at net/http.serverHandler.ServeHTTP()\n\t/usr/local/go/src/net/http/server.go:2947\n at net/http.(*conn).serve()\n\t/usr/local/go/src/net/http/server.go:1991\n at runtime.goexit()\n\t/usr/local/go/src/runtime/asm_amd64.s:1594"
}

What did you expect to see?

access the dashboard

What version of TiDB Dashboard are you using (./tidb-dashboard --version)?

the dashboard with 1.5.1 tidb-operator.

Murasame233 commented 2 months ago
    // (Deprecated) EnableDashboardInternalProxy would directly set `internal-proxy` in the `PdConfig`.
    // Note that this is deprecated, we should just set `dashboard.internal-proxy` in `pd.config`.
    // +optional

I saw it Deprecated, why?