Qihoo360 / WatchAD2.0

WatchAD2.0是一款针对域威胁的日志分析与监控系统
GNU General Public License v3.0
382 stars 57 forks source link

请问登陆时,容器日志有如下报错,怎么解决 #4

Closed xTGor closed 1 year ago

xTGor commented 1 year ago

==> web.log <== [HTTP Server] http: panic serving 192.168.23.1:58289: runtime error: invalid memory address or nil pointer dereference goroutine 53 [running]: net/http.(conn).serve.func1(0xc00056ad20) /usr/local/go/src/net/http/server.go:1801 +0x147 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:975 +0x47a go.mongodb.org/mongo-driver/mongo.(Cursor).closeImplicitSession(0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:267 +0x22 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).Close(0x0, 0x157a3e0, 0xc0000ae048, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:180 +0x51 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).All(0x0, 0x157a3e0, 0xc0000ae048, 0x10d82e0, 0xc00038c1e0, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:209 +0x1e7 iatp/iatp_wbm/repositories.(userMemoryRepository).SearchByName(0xc00035c1c0, 0xc00035c380, 0x16, 0x12f66c4, 0x8, 0xc000389800) /go/src/iatp_opensource/iatp_wbm/repositories/user_repository.go:46 +0xb9 iatp/iatp_wbm/services.(userService).SearchByName(0xc00026b080, 0xc00035c380, 0x16, 0xc000268050, 0xf, 0x12) /go/src/iatp_opensource/iatp_wbm/services/user_service.go:33 +0x47 iatp/iatp_wbm/controllers.(UserController).PostLogin(0xc0003a8600, 0x0, 0x0) /go/src/iatp_opensource/iatp_wbm/controllers/user_controller.go:118 +0xed reflect.Value.call(0x1229fa0, 0xc0003a8600, 0x1613, 0x12f07c5, 0x4, 0x1d68040, 0x0, 0x0, 0x7, 0xc000607800, ...) /usr/local/go/src/reflect/value.go:476 +0x8c7 reflect.Value.Call(0x1229fa0, 0xc0003a8600, 0x1613, 0x1d68040, 0x0, 0x0, 0x1613, 0xc000342740, 0x0) /usr/local/go/src/reflect/value.go:337 +0xb9 github.com/kataras/iris/v12/mvc.(ControllerActivator).handlerOf.func2(0x159eb20, 0xc0000e2fc0) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/mvc/controller.go:497 +0x3cb github.com/kataras/iris/v12/context.DefaultNext(0x159eb20, 0xc0000e2fc0) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1343 +0x10c github.com/kataras/iris/v12/context.(context).Next(0xc0000e2fc0) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1352 +0x3e github.com/kataras/iris/v12/sessions.(Sessions).Handler.func1(0x159eb20, 0xc0000e2fc0) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/sessions/sessions.go:105 +0x12d github.com/kataras/iris/v12/context.Do(0x159eb20, 0xc0000e2fc0, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1030 +0x82 github.com/kataras/iris/v12/context.(context).Do(0xc0000e2fc0, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1217 +0x55 github.com/kataras/iris/v12/core/router.(routerHandler).HandleRequest(0xc00038cca0, 0x159eb20, 0xc0000e2fc0) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/handler.go:250 +0x562 github.com/kataras/iris/v12/core/router.(Router).BuildRouter.func1(0x15766a0, 0xc0001ac2a0, 0xc0004ce500) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:135 +0x8f github.com/kataras/iris/v12/core/router.(Router).ServeHTTP(0xc000080fa0, 0x15766a0, 0xc0001ac2a0, 0xc0004ce500) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:227 +0x48 net/http.serverHandler.ServeHTTP(0xc0001ac0e0, 0x15766a0, 0xc0001ac2a0, 0xc0004ce500) /usr/local/go/src/net/http/server.go:2843 +0xa3 net/http.(conn).serve(0xc00056ad20, 0x157a3a0, 0xc0002d79c0) /usr/local/go/src/net/http/server.go:1925 +0x8ad created by net/http.(Server).Serve /usr/local/go/src/net/http/server.go:2969 +0x36c [HTTP Server] http: panic serving 192.168.23.1:58290: runtime error: invalid memory address or nil pointer dereference goroutine 54 [running]: net/http.(conn).serve.func1(0xc00056adc0) /usr/local/go/src/net/http/server.go:1801 +0x147 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:975 +0x47a go.mongodb.org/mongo-driver/mongo.(Cursor).closeImplicitSession(0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:267 +0x22 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).Close(0x0, 0x157a3e0, 0xc0000ae048, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:180 +0x51 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).All(0x0, 0x157a3e0, 0xc0000ae048, 0x10d82e0, 0xc0005bc640, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:209 +0x1e7 iatp/iatp_wbm/repositories.(userMemoryRepository).SearchByName(0xc00035c1c0, 0xc0000be1a0, 0x16, 0x12f66c4, 0x8, 0xc0000e4360) /go/src/iatp_opensource/iatp_wbm/repositories/user_repository.go:46 +0xb9 iatp/iatp_wbm/services.(userService).SearchByName(0xc00026b080, 0xc0000be1a0, 0x16, 0xc000595fe0, 0xf, 0x159eb20) /go/src/iatp_opensource/iatp_wbm/services/user_service.go:33 +0x47 iatp/iatp_wbm/controllers.(UserController).PostLogin(0xc000095170, 0x0, 0x0) /go/src/iatp_opensource/iatp_wbm/controllers/user_controller.go:118 +0xed reflect.Value.call(0x1229fa0, 0xc000095170, 0x1613, 0x12f07c5, 0x4, 0x1d68040, 0x0, 0x0, 0x7, 0xc000605800, ...) /usr/local/go/src/reflect/value.go:476 +0x8c7 reflect.Value.Call(0x1229fa0, 0xc000095170, 0x1613, 0x1d68040, 0x0, 0x0, 0x1613, 0xc000342740, 0xc00005a8b8) /usr/local/go/src/reflect/value.go:337 +0xb9 github.com/kataras/iris/v12/mvc.(ControllerActivator).handlerOf.func2(0x159eb20, 0xc000276900) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/mvc/controller.go:497 +0x3cb github.com/kataras/iris/v12/context.DefaultNext(0x159eb20, 0xc000276900) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1343 +0x10c github.com/kataras/iris/v12/context.(context).Next(0xc000276900) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1352 +0x3e github.com/kataras/iris/v12/sessions.(Sessions).Handler.func1(0x159eb20, 0xc000276900) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/sessions/sessions.go:105 +0x12d github.com/kataras/iris/v12/context.Do(0x159eb20, 0xc000276900, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1030 +0x82 github.com/kataras/iris/v12/context.(context).Do(0xc000276900, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1217 +0x55 github.com/kataras/iris/v12/core/router.(routerHandler).HandleRequest(0xc00038cca0, 0x159eb20, 0xc000276900) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/handler.go:250 +0x562 github.com/kataras/iris/v12/core/router.(Router).BuildRouter.func1(0x15766a0, 0xc000284000, 0xc0001a4600) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:135 +0x8f github.com/kataras/iris/v12/core/router.(Router).ServeHTTP(0xc000080fa0, 0x15766a0, 0xc000284000, 0xc0001a4600) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:227 +0x48 net/http.serverHandler.ServeHTTP(0xc0001ac0e0, 0x15766a0, 0xc000284000, 0xc0001a4600) /usr/local/go/src/net/http/server.go:2843 +0xa3 net/http.(conn).serve(0xc00056adc0, 0x157a3a0, 0xc0002d7840) /usr/local/go/src/net/http/server.go:1925 +0x8ad created by net/http.(Server).Serve /usr/local/go/src/net/http/server.go:2969 +0x36c [HTTP Server] http: panic serving 192.168.23.1:58568: runtime error: invalid memory address or nil pointer dereference goroutine 182 [running]: net/http.(conn).serve.func1(0xc0000ecc80) /usr/local/go/src/net/http/server.go:1801 +0x147 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:975 +0x47a go.mongodb.org/mongo-driver/mongo.(Cursor).closeImplicitSession(0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:267 +0x22 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).Close(0x0, 0x157a3e0, 0xc0000ae048, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:180 +0x51 panic(0x11860a0, 0x1d003b0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 go.mongodb.org/mongo-driver/mongo.(Cursor).All(0x0, 0x157a3e0, 0xc0000ae048, 0x10d82e0, 0xc00038d180, 0x0, 0x0) /go/src/iatp_opensource/vendor/go.mongodb.org/mongo-driver/mongo/cursor.go:209 +0x1e7 iatp/iatp_wbm/repositories.(userMemoryRepository).SearchByName(0xc00035c1c0, 0xc000320760, 0x16, 0x12f66c4, 0x8, 0xc000389d80) /go/src/iatp_opensource/iatp_wbm/repositories/user_repository.go:46 +0xb9 iatp/iatp_wbm/services.(userService).SearchByName(0xc00026b080, 0xc000320760, 0x16, 0xc0003097f0, 0xf, 0x159eb20) /go/src/iatp_opensource/iatp_wbm/services/user_service.go:33 +0x47 iatp/iatp_wbm/controllers.(UserController).PostLogin(0xc0002f7a70, 0x0, 0x0) /go/src/iatp_opensource/iatp_wbm/controllers/user_controller.go:118 +0xed reflect.Value.call(0x1229fa0, 0xc0002f7a70, 0x1613, 0x12f07c5, 0x4, 0x1d68040, 0x0, 0x0, 0x7, 0xc000603800, ...) /usr/local/go/src/reflect/value.go:476 +0x8c7 reflect.Value.Call(0x1229fa0, 0xc0002f7a70, 0x1613, 0x1d68040, 0x0, 0x0, 0x1613, 0xc000342740, 0xc0000618b8) /usr/local/go/src/reflect/value.go:337 +0xb9 github.com/kataras/iris/v12/mvc.(ControllerActivator).handlerOf.func2(0x159eb20, 0xc00031c870) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/mvc/controller.go:497 +0x3cb github.com/kataras/iris/v12/context.DefaultNext(0x159eb20, 0xc00031c870) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1343 +0x10c github.com/kataras/iris/v12/context.(context).Next(0xc00031c870) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1352 +0x3e github.com/kataras/iris/v12/sessions.(Sessions).Handler.func1(0x159eb20, 0xc00031c870) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/sessions/sessions.go:105 +0x12d github.com/kataras/iris/v12/context.Do(0x159eb20, 0xc00031c870, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1030 +0x82 github.com/kataras/iris/v12/context.(context).Do(0xc00031c870, 0xc00026b700, 0x2, 0x2) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/context/context.go:1217 +0x55 github.com/kataras/iris/v12/core/router.(routerHandler).HandleRequest(0xc00038cca0, 0x159eb20, 0xc00031c870) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/handler.go:250 +0x562 github.com/kataras/iris/v12/core/router.(Router).BuildRouter.func1(0x15766a0, 0xc0001ac380, 0xc0004cff00) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:135 +0x8f github.com/kataras/iris/v12/core/router.(Router).ServeHTTP(0xc000080fa0, 0x15766a0, 0xc0001ac380, 0xc0004cff00) /go/src/iatp_opensource/vendor/github.com/kataras/iris/v12/core/router/router.go:227 +0x48 net/http.serverHandler.ServeHTTP(0xc0001ac0e0, 0x15766a0, 0xc0001ac380, 0xc0004cff00) /usr/local/go/src/net/http/server.go:2843 +0xa3 net/http.(conn).serve(0xc0000ecc80, 0x157a3a0, 0xc000315100) /usr/local/go/src/net/http/server.go:1925 +0x8ad created by net/http.(Server).Serve /usr/local/go/src/net/http/server.go:2969 +0x36c

xTGor commented 1 year ago

补充问题,iatp启动时,有报错日志 [+] DEMO 域注册失败: 未查询到域控制器. 创建日志缓存....

Cgaii commented 1 year ago

补充问题,iatp启动时,有报错日志 [+] DEMO 域注册失败: 未查询到域控制器. 创建日志缓存....

域控服务器ldap有开启ssl吗?如果账号密码、网络联通没有问题,可能是因为docker默认部署走的ssl导致的认证失败。 可以尝试下在entrypoint.sh文件中,去掉--ssl重新部署

Cgaii commented 1 year ago

@xTGor 师傅辛苦看下最新的readme和代码,我们对配置项做了说明,看下能否解决掉报错~