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

MongoDB ping failed when source code is deployed on Windows. #2192

Closed
Wunengwei opened this issue Apr 21, 2024 · 5 comments
Closed

MongoDB ping failed when source code is deployed on Windows. #2192

Wunengwei opened this issue Apr 21, 2024 · 5 comments
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@Wunengwei
Copy link

What happened?

In scripts/mongo-init.sh, there is "var authResult = db.auth(rootUsername, rootPassword);". It seems the bug occurred because of the root user has not been created. I have tried to add create root user in mongo-init.sh, but it’s useless.

When use “docker compose up”:

mongo | {"t":{"$date":"2024-04-21T21:23:01.674+08:00"},"s":"I", "c":"ACCESS", "id":20249, "ctx":"conn8","msg":"Authentication failed","attr":{"mechanism":"SCRAM-SHA-256","speculative":true,"principalName":"openIM","authenticationDatabase":"openim_v3","remote":"172.23.0.1:55750","extraInfo":{},"error":"UserNotFound: Could not find user "openIM" for db "openim_v3""}}
mongo | {"t":{"$date":"2024-04-21T21:23:01.676+08:00"},"s":"I", "c":"ACCESS", "id":20249, "ctx":"conn8","msg":"Authentication failed","attr":{"mechanism":"SCRAM-SHA-1","speculative":false,"principalName":"openIM","authenticationDatabase":"openim_v3","remote":"172.23.0.1:55750","extraInfo":{},"error":"UserNotFound: Could not find user "openIM" for db "openim_v3""}}

When use "mage start":

Kubernetes is not installed. Please install it to get the version.
Starting D:\2024GraduationDesgin\Server\open-im-server_output\bin\tools\windows\amd64\versionchecker.exe -c D:\2024GraduationDesgin\Server\open-im-server\config\ successfully
Starting D:\2024GraduationDesgin\Server\open-im-server_output\bin\tools\windows\amd64\check-component.exe -c D:\2024GraduationDesgin\Server\open-im-server\config
check-component Index: 0, Config Path: D:\2024GraduationDesgin\Server\open-im-server\config
Zookeeper check succeeded.
Mongo check failed: MongoDB ping failed, URI=mongodb://openIM:openIM123@localhost:37017/openim_v3?maxPoolSize=100, Database=openim_v3, MaxPoolSize=100: connection() error occurred during connection handshake: auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed.
Redis check succeeded.
MinIO check succeeded.

What did you expect to happen?

Project compile failed. And it occurred.

How can we reproduce it (as minimally and precisely as possible)?

I don't know. I followed the steps to deploy the server, and docker is working properly.

Anything else we need to know?

In scripts/mongo-init.sh, there is "var authResult = db.auth(rootUsername, rootPassword);". It seems the bug occurred because of the root user has not been created. I have tried to add create root user in mongo-init.sh, but it’s useless.

version

BootDevice BuildNumber BuildType Caption CodeSet Cou
\Device\HarddiskVolume1 23536 Multiprocessor Free Microsoft Windows 11 Home Insider Preview China 936 86

Cloud provider

No have.

OS version

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here # On Windows: C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture # paste output here ```

Install tools

Source code deployment.

@Wunengwei Wunengwei added the bug Categorizes issue or PR as related to a bug. label Apr 21, 2024
@kubbot
Copy link
Contributor

kubbot commented Apr 21, 2024

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.

@skiffer-git
Copy link
Member

Have OpenIM been deployed before?
Can we take a look at the MongoDB logs?

@skiffer-git
Copy link
Member

In Windows, Git would automatically add \r.
This has now been fixed.

@jianglai12
Copy link

Hey, brother. Do You found a solution? I had the same problem

@jianglai12
Copy link

I had the same problem
look at the picture below
微信截图_20240531204246

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

4 participants