Skip to content
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

Closed
heminghaoa opened this issue Dec 28, 2023 · 12 comments
Assignees
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@heminghaoa
Copy link

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

aws

OS version

PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

Install tools

@heminghaoa heminghaoa added the bug Categorizes issue or PR as related to a bug. label Dec 28, 2023
@kubbot
Copy link
Contributor

kubbot commented Dec 28, 2023

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.

@cubxxw
Copy link
Contributor

cubxxw commented Dec 28, 2023

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?

@heminghaoa
Copy link
Author

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.

@cubxxw
Copy link
Contributor

cubxxw commented Dec 29, 2023

It is normal for the ID to be different if it is used twice, right?

@heminghaoa
Copy link
Author

heminghaoa commented Dec 29, 2023

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.

@soonio
Copy link

soonio commented Dec 30, 2023

是不是用的mongo集群啊,试试mongo分片,别用集群~

@kubbot
Copy link
Contributor

kubbot commented Dec 30, 2023

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~

@heminghaoa
Copy link
Author

有道理,我试试改一下

@kubbot
Copy link
Contributor

kubbot commented Dec 31, 2023

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


That makes sense. I'll try changing it.

@wu0h961738
Copy link

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.

@kubbot
Copy link
Contributor

kubbot commented May 13, 2024

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.

@skiffer-git
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

6 participants