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显示网络超时 #7

Open
qvc180 opened this issue Aug 25, 2022 · 3 comments
Open

mongodb显示网络超时 #7

qvc180 opened this issue Aug 25, 2022 · 3 comments

Comments

@qvc180
Copy link

qvc180 commented Aug 25, 2022

mongodb显示网络超时,连接的实例为无账号密码的,mongodb://127.0.0.1:27017

@1ch0
Copy link
Contributor

1ch0 commented Aug 26, 2022

mongodb显示网络超时,连接的实例为无账号密码的,mongodb://127.0.0.1:27017

测试连接无账号密码本地 MongoDB 正常,你需要确认一下你本地的 MongoDB 服务是否启动正常,可以先用 MongoDB Compass 等工具连接测试一下。

@qvc180
Copy link
Author

qvc180 commented Sep 15, 2022

我这还是显示网络超时,但是用其他工具是正常的,请问在哪能看到相关的日志?我在nohup.out里没看到MongoDB相关的连接日志

@1ch0
Copy link
Contributor

1ch0 commented Dec 1, 2022

我觉得应该还是你应用启动环境的问题,应用启用的环境无法正常连接 mongo 数据库。你可以写个简单 mongo client 在 mayfly-go 启动环境中去试试能不能连上 mongo 数据库。
日志的话数据库的连接应该也只有一个操作,你填好数据然后 mayfly-go 去调用 mongo client 去连接数据库,这个操作本身也就只有连接成功跟连接失败两种状态。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants