panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102ad9630]
goroutine 1 [running]:
main.main()
/chat/Open-IM-Server/cmd/Open-IM-SDK-Core/ws_wrapper/cmd/open_im_sdk_server.go:62 +0x2b0
open db ok root:passwd@tcp(127.0.0.1:3306)/openIM_v2?charset=utf8mb4&parseTime=true&loc=Local
0 0 mongo driver client init success: mongodb://127.0.0.1:37017/openIM/?maxPoolSize=20
Solution: open_im_sdk_server变量未赋值
server selection timeout, current topology
mongodb create cChatModels failed [] server selection error: server selection timeout, current topology: { Type: Unknown, Servers: [{ Addr: 127.0.0.1:37017, Type: Unknown, Last error: connection() error occured during connection handshake: dial tcp 127.0.0.1:37017: connect: connection refused }, ] }
安装mongodb后要注意端口是否正确