tidb dashboard 慢查询无法显示

【 TiDB 使用环境】生产环境
【 TiDB 版本】
v6.1.5
【遇到的问题:问题现象及影响】
dashboard 上访问 慢查询页面显示 common.bad_request 400

url:
http://1.1.1.1:2379/dashboard/api/slow_query/list?begin_time=1678950184&desc=true&digest=&end_time=1678950485&fields=query%2Ctimestamp%2Cquery_time%2Cmemory_max&limit=100&orderBy=query_time&text=

目前尝试重启pd节点,但是未解决,请问如何处理?
【附件:截图/日志/监控】
image

pd节点日志
[2023/03/16 14:54:47.489 +08:00] [WARN] [error.go:89] [“Error when handling request”] [uri=“/dashboard/api/slow_query/list?begin_time=1678947887&desc=true&digest=&end_time=1678949688&fields=query%2Ctimestamp%2Cquery_time%2Cmemory_max&limit=100&orderBy=query_time&text=”] [remoteAddr=10.7.7.3:64373] [errorFullText=“common.bad_request\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/slowquery.(*Service).getList()\n\t/go/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20220518164040-4d621864a9a0/pkg/apiserver/slowquery/service.go:76\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/pkg/apiserver/utils.MWConnectTiDB.func1()\n\t/go/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20220518164040-4d621864a9a0/pkg/apiserver/utils/tidb_conn.go:66\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/breeswish/gin-jwt/v2.(*GinJWTMiddleware).middlewareImpl()\n\t/go/pkg/mod/github.com/breeswish/gin-jwt/v2@v2.6.4-jwt-patch/auth_jwt.go:403\n at github.com/pingcap/tidb-dashboard/pkg/apiserver/user.(*AuthService).MWAuthRequired.func1()\n\t/go/pkg/mod/github.com/breeswish/gin-jwt/v2@v2.6.4-jwt-patch/auth_jwt.go:365\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/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20220518164040-4d621864a9a0/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/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20220518164040-4d621864a9a0/pkg/apiserver/apiserver.go:240\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/pkg/mod/github.com/pingcap/tidb-dashboard@v0.0.0-20220518164040-4d621864a9a0/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 go.etcd.io/etcd/embed.(*accessController).ServeHTTP()\n\t/go/pkg/mod/go.etcd.io/etcd@v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/embed/serve.go:359\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”]

丢个集群状态看看

别的页面都能打开,只有慢查询页面打不开?


集群状态都正常。

对啊 所以非常难受。觉得好蛋疼。

重启一下PD|UI节点试试

换个 PD 来支持 UI 的能力,官方文档上有介绍的

看看慢日是不是特别多

image
您发的 连接 是 1.1.1.1:2379 。 您中间是不是做什么 了 ???

直接 访问 10.10.10.74:2379/dashboard 有问题没 ?? 还是说同样的问题

抱歉, 纯粹是截图打码给漏了。

我切到新的节点去 查询正常了
tiup ctl:v<CLUSTER_VERSION> pd -u http://127.0.0.1:2379 config set dashboard-address http://9.9.9.9:2379

要是做转发了 nginx 了。 可以直接访问看看。

恭喜~ 有问题的那个节点,可以考虑缩容掉,在重新扩容