Skip to content

[BUG] The normal running service suddenly cannot find the session list, but the data can be found based on the session id of the log. #3457

@tzxylao

Description

@tzxylao

OpenIM Server Version

3.8.3

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

Call interface:
/openim.msg.msg/GetMsgByConversationIDs

ErrorLog

2025-07-11 11:21:45.367	WARN	[PID:7]        	openim-rpc-msg           	[v3.8.3

 ]                     	[mw/rpc_server_interceptor.go:85]                 	rpc server response failed                        	{"platform": "Admin", "operationID": "446ac8312091c68dc0b94c03b09d71ab", "opUserID": "0", "method": "/openim.msg.msg/GetMsgByConversationIDs", "req": "conversationIDs:\"sg_851858979059666945\" conversationIDs:\"sg_851858979059666947\" conversationIDs:\"sg_851858979063861249\" conversationIDs:\"sg_851858979076444161\" conversationIDs:\"sg_851858979080638464\" conversationIDs:\"sg_851858985716027392\" conversationIDs:\"sg_870021927200362496\" conversationIDs:\"sg_870021928399933440\" conversationIDs:\"sg_872571821530284032\" conversationIDs:\"sg_875502600711311360\" conversationIDs:\"sg_875502601982185472\" conversationIDs:\"sg_898551093910568960\" conversationIDs:\"si_632191907201286144_632191907201286144\" maxSeqs:{key:\"sg_851858979059666945\" value:101} maxSeqs:{key:\"sg_851858979059666947\" value:101} maxSeqs:{key:\"sg_851858979063861249\" value:611} maxSeqs:{key:\"sg_851858979076444161\" value:101} maxSeqs:{key:\"sg_851858979080638464\" value:404} maxSeqs:{key:\"sg_851858985716027392\" value:101} maxSeqs:{key:\"sg_870021927200362496\" value:101} maxSeqs:{key:\"sg_870021928399933440\" value:101} maxSeqs:{key:\"sg_872571821530284032\" value:101} maxSeqs:{key:\"sg_875502600711311360\" value:101} maxSeqs:{key:\"sg_875502601982185472\" value:101} maxSeqs:{key:\"sg_898551093910568960\" value:101} maxSeqs:{key:\"si_632191907201286144_632191907201286144\" value:103}", "error": "Error: mongo find one | -> mongoutil.FindOne[...]() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/db/mongoutil/util.go:97 -> mgo.(*MsgMgo).FindOneByDocID() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/common/storage/database/mgo/msg.go:75 -> controller.(*commonMsgDatabase).FindOneByDocIDs() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/common/storage/controller/msg.go:680 -> msg.(*msgServer).GetMsgByConversationIDs() /Users/tzxylao/golandProjects/OpenIM_Server/internal/rpc/msg/seq.go:51 -> msg._Msg_GetMsgByConversationIDs_Handler.func1() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/msg/msg_grpc.pb.go:727 -> startrpc.Start[...].prommetricsUnaryInterceptor.func7() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/common/startrpc/start.go:228 -> grpc.getChainUnaryHandler.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1211 -> mw.RpcServerInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_server_interceptor.go:40 -> grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1202 -> msg._Msg_GetMsgByConversationIDs_Handler() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/msg/msg_grpc.pb.go:729 -> grpc.(*Server).processUnaryRPC() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1394 -> grpc.(*Server).handleStream() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1806 -> grpc.(*Server).serveStreams.func2.1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1030"}

 2025-07-11 11:21:45.367	WARN	[PID:29]       	openim-rpc-conversation  	[v3.8.3

 ]                     	[mw/rpc_client_interceptor.go:69]                 	rpc client response failed                        	{"platform": "Admin", "operationID": "446ac8312091c68dc0b94c03b09d71ab", "opUserID": "0", "method": "/openim.msg.msg/GetMsgByConversationIDs", "req": "conversationIDs:\"sg_851858979059666945\" conversationIDs:\"sg_851858979059666947\" conversationIDs:\"sg_851858979063861249\" conversationIDs:\"sg_851858979076444161\" conversationIDs:\"sg_851858979080638464\" conversationIDs:\"sg_851858985716027392\" conversationIDs:\"sg_870021927200362496\" conversationIDs:\"sg_870021928399933440\" conversationIDs:\"sg_872571821530284032\" conversationIDs:\"sg_875502600711311360\" conversationIDs:\"sg_875502601982185472\" conversationIDs:\"sg_898551093910568960\" conversationIDs:\"si_632191907201286144_632191907201286144\" maxSeqs:{key:\"sg_851858979059666945\" value:101} maxSeqs:{key:\"sg_851858979059666947\" value:101} maxSeqs:{key:\"sg_851858979063861249\" value:611} maxSeqs:{key:\"sg_851858979076444161\" value:101} maxSeqs:{key:\"sg_851858979080638464\" value:404} maxSeqs:{key:\"sg_851858985716027392\" value:101} maxSeqs:{key:\"sg_870021927200362496\" value:101} maxSeqs:{key:\"sg_870021928399933440\" value:101} maxSeqs:{key:\"sg_872571821530284032\" value:101} maxSeqs:{key:\"sg_875502600711311360\" value:101} maxSeqs:{key:\"sg_875502601982185472\" value:101} maxSeqs:{key:\"sg_898551093910568960\" value:101} maxSeqs:{key:\"si_632191907201286144_632191907201286144\" value:103}", "error": "Error: 1004 RecordNotFoundError mongo find one | -> mw.RpcClientInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_client_interceptor.go:68 -> grpc.(*ClientConn).Invoke() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/call.go:35 -> msg.(*msgClient).GetMsgByConversationIDs() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/msg/msg_grpc.pb.go:169 -> rpcli.extractField[...]() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/rpcli/tool.go:10 -> rpcli.(*MsgClient).GetMsgByConversationIDs() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/rpcli/msg.go:32 -> conversation.(*conversationServer).GetSortedConversationList() /Users/tzxylao/golandProjects/OpenIM_Server/internal/rpc/conversation/conversation.go:150 -> conversation._Conversation_GetSortedConversationList_Handler.func1() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation_grpc.pb.go:502 -> startrpc.Start[...].prommetricsUnaryInterceptor.func7() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/common/startrpc/start.go:228 -> grpc.getChainUnaryHandler.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1211 -> mw.RpcServerInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_server_interceptor.go:40 -> grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1202 -> conversation._Conversation_GetSortedConversationList_Handler() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation_grpc.pb.go:504 -> grpc.(*Server).processUnaryRPC() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1394 -> grpc.(*Server).handleStream() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1806 -> grpc.(*Server).serveStreams.func2.1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1030"}

 2025-07-11 11:21:45.368	WARN	[PID:29]       	openim-rpc-conversation  	[v3.8.3

 ]                     	[mw/rpc_server_interceptor.go:85]                 	rpc server response failed                        	{"platform": "Admin", "operationID": "446ac8312091c68dc0b94c03b09d71ab", "opUserID": "0", "method": "/openim.conversation.conversation/GetSortedConversationList", "req": "userID:\"632191907201286144\" pagination:{pageNumber:1 showNumber:2000}", "error": "Error: 1004 RecordNotFoundError mongo find one | -> mw.RpcClientInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_client_interceptor.go:68 -> grpc.(*ClientConn).Invoke() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/call.go:35 -> msg.(*msgClient).GetMsgByConversationIDs() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/msg/msg_grpc.pb.go:169 -> rpcli.extractField[...]() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/rpcli/tool.go:10 -> rpcli.(*MsgClient).GetMsgByConversationIDs() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/rpcli/msg.go:32 -> conversation.(*conversationServer).GetSortedConversationList() /Users/tzxylao/golandProjects/OpenIM_Server/internal/rpc/conversation/conversation.go:150 -> conversation._Conversation_GetSortedConversationList_Handler.func1() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation_grpc.pb.go:502 -> startrpc.Start[...].prommetricsUnaryInterceptor.func7() /Users/tzxylao/golandProjects/OpenIM_Server/pkg/common/startrpc/start.go:228 -> grpc.getChainUnaryHandler.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1211 -> mw.RpcServerInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_server_interceptor.go:40 -> grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1202 -> conversation._Conversation_GetSortedConversationList_Handler() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation_grpc.pb.go:504 -> grpc.(*Server).processUnaryRPC() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1394 -> grpc.(*Server).handleStream() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1806 -> grpc.(*Server).serveStreams.func2.1() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/server.go:1030"}

 2025-07-11 11:21:45.368	WARN	[PID:30]       	openim-api               	[v3.8.3

 ]                     	[mw/rpc_client_interceptor.go:69]                 	rpc client response failed                        	{"platform": "Admin", "operationID": "446ac8312091c68dc0b94c03b09d71ab", "opUserID": "0", "method": "/openim.conversation.conversation/GetSortedConversationList", "req": "userID:\"632191907201286144\" pagination:{pageNumber:1 showNumber:2000}", "error": "Error: 1004 RecordNotFoundError mongo find one | -> mw.RpcClientInterceptor() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/rpc_client_interceptor.go:68 -> grpc.(*ClientConn).Invoke() /Users/tzxylao/go/pkg/mod/google.golang.org/[email protected]/call.go:35 -> conversation.(*conversationClient).GetSortedConversationList() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/conversation/conversation_grpc.pb.go:114 -> a2r.Call[...]() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/a2r/api2rpc.go:58 -> api.(*ConversationApi).GetSortedConversationList() /Users/tzxylao/golandProjects/OpenIM_Server/internal/api/conversation.go:36 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:175 -> api.newGinRouter.GinParseToken.func4() /Users/tzxylao/golandProjects/OpenIM_Server/internal/api/router.go:324 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:175 -> api.newGinRouter.GinParseOperationID.func3() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/gin.go:76 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:175 -> api.newGinRouter.CorsHandler.func2() /Users/tzxylao/go/pkg/mod/github.com/openimsdk/[email protected]/mw/gin.go:60 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 -> gin.CustomRecoveryWithWriter.func1() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:172 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:175 -> api.newGinRouter.prommetricsGin.func1() /Users/tzxylao/golandProjects/OpenIM_Server/internal/api/router.go:43 -> gin.(*Context).Next() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 -> gin.(*Engine).handleHTTPRequest() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:172 -> gin.(*Engine).ServeHTTP() /Users/tzxylao/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:578 -> http.serverHandler.ServeHTTP() /usr/local/go/src/net/http/server.go:3302 -> http.(*conn).serve() /usr/local/go/src/net/http/server.go:2103"}

Is it because of seq? The algorithm of the code cannot route the correct data? I didn't move the database, and the service suddenly turned like this. Is this a known problem? Is there a solution? This is a problem that arises in the test environment. The online environment does not appear. Data can be deleted. Can this problem be solved by deleting data? At present, this problem will cause the user to not find any sessions, but the actual user has already joined several sessions. It may be that due to the problem of some session data, the entire interface cannot find data.

Screenshots Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions