hxhac / mali

Life Manage
MIT License
0 stars 0 forks source link

登录时报错 #172

Closed hxhac closed 9 months ago

hxhac commented 11 months ago

gva-server | 2023-08-19T02:32:19.700511544Z MALI2023/08/19 - 10:32:19.700 error /build/middleware/logger.go:95 [Recovery from panic] {"error": "runtime error: invalid memory address or nil pointer dereference", "request": "POST /menu/getMenu HTTP/1.0\r\nHost: mali.wrss.top\r\nAccept: application/json, text/plain, /\r\nAccept-Encoding: gzip, deflate, br\r\nAccept-Language: zh-CN,zh;q=0.9,en;q=0.8\r\nConnection: close\r\nContent-Length: 0\r\nDnt: 1\r\nOrigin: https://mali.wrss.top\r\nReferer: https://mali.wrss.top/\r\nSec-Ch-Ua: \"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"\r\nSec-Ch-Ua-Mobile: ?0\r\nSec-Ch-Ua-Platform: \"macOS\"\r\nSec-Fetch-Dest: empty\r\nSec-Fetch-Mode: cors\r\nSec-Fetch-Site: same-origin\r\nSec-Gpc: 1\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\r\nX-Forwarded-For: 185.36.194.83, 177.7.0.1\r\nX-Forwarded-Proto: http\r\nX-Real-Ip: 177.7.0.1\r\nX-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTMwMTcxMzksImlzcyI6InFtUGx1cyIsIm5iZiI6MTY5MjQxMTMzOSwiVXNlcm5hbWUiOiJhZG1pbiIsIk5pY2tOYW1lIjoi6LaF57qn566h55CG5ZGYIiwiQXV0aG9yaXR5SWQiOiI4ODgiLCJJRCI6MSwiVVVJRCI6ImYzMTk1YjgxLTEzM2MtNDc0Zi04MGU5LTUzNWQzMTQyOTM5MSIsIkJ1ZmZlclRpbWUiOjg2NDAwfQ.d44QxSQAH0HjS7YkcQ4laENUdwgucX_3wkxY-MsRyg0\r\nX-User-Id: 1\r\n\r\n", "stack": "goroutine 851 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/flipped-aurora/gin-vue-admin/server/middleware.ZapRecovery.func1.1()\n\t/build/middleware/logger.go:98 +0x2cc\npanic({0x142aaa0, 0x38477c0})\n\t/usr/local/go/src/runtime/panic.go:884 +0x213\ngithub.com/casbin/casbin/v2.(SyncedEnforcer).LoadPolicy(0x0)\n\t/go/pkg/mod/github.com/casbin/casbin/v2@v2.54.0/enforcer_synced.go:118 +0x34\ngithub.com/flipped-aurora/gin-vue-admin/server/service/system.(CasbinService).Casbin(0xc001305301?)\n\t/build/service/system/sys_casbin.go:97 +0x3d\ngithub.com/flipped-aurora/gin-vue-admin/server/middleware.CasbinHandler.func1(0xc0004ceb00)\n\t/build/middleware/casbin_rbac.go:23 +0x76\ngithub.com/gin-gonic/gin.(Context).Next(...)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/flipped-aurora/gin-vue-admin/server/middleware.JWTAuth.func1(0xc0004ceb00)\n\t/build/middleware/jwt.go:71 +0x7c3\ngithub.com/gin-gonic/gin.(Context).Next(...)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/flipped-aurora/gin-vue-admin/server/middleware.ZapRecovery.func1(0xc0004ceb00)\n\t/build/middleware/logger.go:109 +0x76\ngithub.com/gin-gonic/gin.(Context).Next(...)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/flipped-aurora/gin-vue-admin/server/middleware.ZapLogger.func1(0xc0004ceb00)\n\t/build/middleware/logger.go:50 +0x9d\ngithub.com/gin-gonic/gin.(Context).Next(...)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173\ngithub.com/gin-gonic/gin.(Engine).handleHTTPRequest(0xc0000efd40, 0xc0004ceb00)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 +0x66b\ngithub.com/gin-gonic/gin.(Engine).ServeHTTP(0xc0000efd40, {0x19dd3a0?, 0xc0000e09a0}, 0xc0004cf800)\n\t/go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 +0x1dd\nnet/http.serverHandler.ServeHTTP({0xc00136d3b0?}, {0x19dd3a0, 0xc0000e09a0}, 0xc0004cf800)\n\t/usr/local/go/src/net/http/server.go:2936 +0x316\nnet/http.(conn).serve(0xc000841b90, {0x19de808, 0xc0007a0930})\n\t/usr/local/go/src/net/http/server.go:1995 +0x612\ncreated by net/http.(Server).Serve\n\t/usr/local/go/src/net/http/server.go:3089 +0x5ed\n"}

hxhac commented 9 months ago

49

hxhac commented 9 months ago

重启docker服务可以解决

可能是直接reboot服务器导致的,没有做docker容器的平滑停止

注意重置数据库时,需要输入内网ip