grafana配置ldap过程中报错invalid memory address or nil pointer dereference“ stack=“runtime/panic.go:261...“

现象

在配置给grafana配置ldap服务用于用户认证登录验证的过程中发现报错日志

level=error msg="Request error" error="runtime error: invalid memory address or nil pointer dereference" stack="runtime/panic.go:261 (0x56ac0f7)
runtime/signal_unix.go:861 (0x56ac0c5)
github.com/grafana/grafana/pkg/services/ldap/api/service.go:263 (0x9b941db)
github.com/grafana/grafana/pkg/api/routing/routing.go:17 (0x9b92e9b)
github.com/grafana/grafana/pkg/api/response/web_hack.go:40 (0x6c202af)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:131 (0x6c12b6e)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/services/contexthandler/contexthandler.go:137 (0x9338881)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/render.go:44 (0x6c136fd)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/macaron.go:137 (0x6c12c12)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/csrf/csrf.go:66 (0x8929bda)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/recovery.go:180 (0x931097d)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/loggermw/logger.go:72 (0x892abf6)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/request_metrics.go:75 (0x70b7db5)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/request_tracing.go:88 (0x9311655)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/middleware/requestmeta/request_metadata.go:66 (0x93379d5)
net/http/server.go:2136 (0x5a07608)
github.com/grafana/grafana/pkg/web/context.go:52 (0x6c11656)
github.com/grafana/grafana/pkg/web/router.go:155 (0x6c14dcd)
github.com/grafana/grafana/pkg/web/router.go:221 (0x6c15914)
github.com/grafana/grafana/pkg/web/macaron.go:163 (0x6c1303c)
net/http/server.go:2938 (0x5a0a2ed)
net/http/server.go:2009 (0x5a061d3)
runtime/asm_amd64.s:1650 (0x56cb600)
"

解决办法

直接升级grafana到最新版本就能解决, 我在github上找到了相似问题, 通过登录界面http://xxx.com/login 可以看到grafana版本,我出现该问题的grafana版本是

v10.4.0 (03f502a94d17f7dc4e6c34acdf8428aedd986e4c)

升级后版本变为

v10.4.1 (d94d597d847c05085542c29dfad6b3f469cc77e1)

参考

Ldap integration; Logout throws “ERR_EMPTY_RESPONSE” error; “runtime error: invalid memory address or nil pointer dereference”
How to know the current version of Grafana?

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值