Bug: <Encountered 'errDlt': 'context canceled' when calling the 'user/user_registe' API.>
What happened?
When I call the user/user_registe to register a user, it returns an error { "errCode": 500, "errMsg": "ServerInternalError", "errDlt": "context canceled" }. However, the first call after running start-all.sh each time succeeds normally.
What did you expect to happen?
{ "errCode": 0, "errMsg": "", "errDlt": "" }register success
How can we reproduce it (as minimally and precisely as possible)?
Used Source Code Deployment, pulling the latest code from the main branch. I use 'export MONGO_URI=mongodb+srv://name:[email protected]/?retryWrites=true' to connect to my DB.Everything else is the same as the steps described in the documentation.
Anything else we need to know?
This is log
2023-12-28 03:00:25.547 ERROR [PID:221640] user [mw/rpc_server_interceptor.go:115] rpc server resp {"operationID": "16464454645642", "funcName": "/OpenIMServer.user.user/UserRegister", "error": "context canceled"} 2023-12-28 03:00:25.547 ERROR [PID:221640] user [mw/rpc_server_interceptor.go:119] rpc InternalServer error {"operationID": "16464454645642", "req": "secret:\"openIM123\" users:{userID:\"11132212\" nickname:\"yourNi21ckname\" faceURL:\"yourFaceURL\"}", "error": "context canceled"} 2023-12-28 03:00:25.547 WARN [PID:221640] user [mw/rpc_server_interceptor.go:171] rpc server resp {"operationID": "16464454645642", "funcName": "/OpenIMServer.user.user/UserRegister"} 2023-12-28 03:00:25.548 ERROR [PID:221148] api [mw/rpc_client_interceptor.go:58] rpc resp error {"operationID": "16464454645642", "error": "rpc error: code = Code(500) desc = ServerInternalError"}
version
Go Version
Go Version: go1.19 OS: linux Architecture: amd64
Branch Type
main
Docker Version
Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
Docker Compose Version
docker-compose version 1.29.2, build unknown
Kubernetes Version
Kubernetes is not installed. Please install it to get the version.
Cloud provider
OS version
Install tools
Hello! Thank you for filing an issue.
If this is a bug report, please include relevant logs to help us debug the problem.
Join slack π€ to connect and communicate with our developers.
Hello, thank you for bringing the issue to our attention. I would like to inquire about the registration process. Did the first attempt to register succeed and the second one fail? Were different user IDs used for each attempt?
The IDs used for the two registrations were different. If the same ID had been used, it would have triggered a RegisteredAlreadyError. The current issue is 'context canceled', and all other functions are operating normally.
It is normal for the ID to be different if it is used twice, right?
If the error returned when an ID is used repeatedly is normal, then using different IDs should have led to successful registration. However, we encountered a 'context canceled' error.
ζ―δΈζ―η¨ηmongoιηΎ€εοΌθ―θ―mongoεηοΌε«η¨ιηΎ€ο½
Bot detected the issue body's language is not English, translate it automatically. π―ππ»π§βπ€βπ§π«π§πΏβπ€βπ§π»π©πΎβπ€βπ¨πΏπ¬πΏ
Are you using a mongo cluster? Try mongo sharding instead of using a cluster~
ζιηοΌζθ―θ―ζΉδΈδΈ
Bot detected the issue body's language is not English, translate it automatically. π―ππ»π§βπ€βπ§π«π§πΏβπ€βπ§π»π©πΎβπ€βπ¨πΏπ¬πΏ
That makes sense. I'll try changing it.
I think it's better to support the solution in which MongoDB could be connected with the clustering. After all, it's suggested by official. Further, connecting with certification would be impossible if applying configuring sharded addresses.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.