-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: <Encountered 'errDlt': 'context canceled' when calling the 'user/user_registe' API.> #1627
Comments
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分片,别用集群~ |
Are you using a mongo cluster? Try mongo sharding instead of using a cluster~ |
有道理,我试试改一下 |
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. |
this issue has fixed in release-v3.8, I recommend you update to new version. If you run into any new issues, please reopen this issue or create a new one. |
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
The text was updated successfully, but these errors were encountered: