I am trying to add datasource:loki by dashboard.But met this error.
And the grafana logs are as below:
t=2241-09-06T04:27:55+0800 lvl=dbug msg=“token needs rotation” logger=auth tokenId=80 authTokenSeen=true rotatedAt=2241-09-06T04:17:42+0800
t=2241-09-06T04:27:55+0800 lvl=dbug msg=“auth token rotated” logger=auth affected=1 auth_token_id=80 userId=1
t=2241-09-06T04:27:55+0800 lvl=dbug msg=“seen token” logger=auth tokenId=80 userId=1 clientIP=172.31.0.5 userAgent=“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36” authToken=911431ab900c0274eab2d3d2e7a480419fcb7e49266d34aefc51b373d44fb4e4
t=2241-09-06T04:27:55+0800 lvl=dbug msg=“Received command to add data source” logger=datasources url=
t=2241-09-06T04:27:55+0800 lvl=eror msg=“Request error” logger=context userId=1 orgId=1 uname=admin error=“cannot accommodate data, need 9 digits, got 8” stack=“/root/go/pkg/mod/github.com/teris-io/shortid@v0.0.0-20171029131806-771a37caa5cf/shortid.go:133 (0xc2e838)\n\tMustGenerate: panic(err)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/util/shortid_generator.go:25 (0xc2e81e)\n\tGenerateShortUID: return shortid.MustGenerate()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/datasource.go:289 (0x103beba)\n\tgenerateNewDatasourceUid: uid := generateNewUid()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/datasource.go:166 (0x103aec4)\n\tAddDataSource.func1: uid, err := generateNewDatasourceUid(sess, cmd.OrgId)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/transactions.go:43 (0x10546e1)\n\tinTransactionWithRetryCtx: err = callback(sess)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/transactions.go:32 (0x103accc)\n\tinTransactionWithRetry: return inTransactionWithRetryCtx(context.Background(), x, callback, retry)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/transactions.go:79 (0x103acab)\n\tinTransaction: return inTransactionWithRetry(callback, 0)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/services/sqlstore/datasource.go:153 (0x103ac94)\n\tAddDataSource: return inTransaction(func(sess *DBSession) error {\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/bus/bus.go:148 (0xf256c4)\n\t(*InProcBus).Dispatch: ret := reflect.ValueOf(handler).Call(params)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/bus/bus.go:225 (0x1ee3f12)\n\tDispatch: return globalBus.Dispatch(msg)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/api/datasources.go:217 (0x1ee3f13)\n\tAddDataSource: if err := bus.Dispatch(&cmd); err != nil {\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:164 (0xf2af26)\n\t(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:124 (0xf2ab74)\n\t(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/api/routing/routing.go:18 (0x17a5c19)\n\tWrap.func1: val, err := c.Invoke(action)\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:164 (0xf2af26)\n\t(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:124 (0xf2ab74)\n\t(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:77 (0xf29cd8)\n\t(*Context).run: vals, err := ctx.Invoke(ctx.handler())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:67 (0x187ba33)\n\t(*Context).Next: ctx.run()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/middleware/request_metrics.go:55 (0x187ba22)\n\tRequestMetrics.func1.1: c.Next()\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:164 (0xf2af26)\n\t(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:124 (0xf2ab74)\n\t(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:77 (0xf29cd8)\n\t(*Context).run: vals, err := ctx.Invoke(ctx.handler())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:67 (0x187abea)\n\t(*Context).Next: ctx.run()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/middleware/recovery.go:166 (0x187abe1)\n\tRecovery.func1: c.Next()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:35 (0xf29b5b)\n\tContextInvoker.Invoke: invoke(params[0].(*Context))\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:144 (0xf2ac94)\n\t(*injector).fastInvoke: return f.Invoke(in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:122 (0xf2abbc)\n\t(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:77 (0xf29cd8)\n\t(*Context).run: vals, err := ctx.Invoke(ctx.handler())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:67 (0x1878a79)\n\t(*Context).Next: ctx.run()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/middleware/logger.go:35 (0x1878a65)\n\tLogger.func1: c.Next()\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:164 (0xf2af26)\n\t(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:124 (0xf2ab74)\n\t(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:77 (0xf29cd8)\n\t(*Context).run: vals, err := ctx.Invoke(ctx.handler())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:67 (0x187d144)\n\t(*Context).Next: ctx.run()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/middleware/request_tracing.go:56 (0x187d135)\n\tRequestTracing.func1: c.Next()\n/usr/local/go/src/reflect/value.go:586 (0x4b6e0a)\n\tValue.call: call(frametype, fn, stackArgs, uint32(frametype.size), uint32(abid.retOffset), uint32(frameSize), ®Args)\n/usr/local/go/src/reflect/value.go:370 (0x4b60bb)\n\tValue.Call: return v.call("Call", in)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:164 (0xf2af26)\n\t(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/inject.go:124 (0xf2ab74)\n\t(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/context.go:77 (0xf29cd8)\n\t(*Context).run: vals, err := ctx.Invoke(ctx.handler())\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/router.go:187 (0xf31ebd)\n\t(*Router).Handle.func1: c.run()\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/router.go:305 (0xf32ff1)\n\t(*Router).ServeHTTP: h(rw, req, p)\n/home/lmq/dev/cf-grafana/git-grafana/cfmq-grafana/pkg/macaron/macaron.go:192 (0xf2c71e)\n\t(*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)\n/usr/local/go/src/net/http/server.go:2936 (0x736315)\n\tserverHandler.ServeHTTP: handler.ServeHTTP(rw, req)\n/usr/local/go/src/net/http/server.go:1995 (0x731cf1)\n\t(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)\n/usr/local/go/src/runtime/asm_amd64.s:1598 (0x47d4e0)\n\tgoexit: BYTE\t$0x90\t// NOP\n”
My grafana version is 8.17 and is deployed in CentOs 7.7. I have added datasource (includue loki,prometheus,simplejson) successfully . But now any datasources has met this error.