简体   繁体   English

无法将 Robo 3T 连接到远程 MongoDB 服务器

[英]Unable to connect Robo 3T to a remote MongoDB server

I'm using Mongo DB Version 3.4.6 on my Windows 7 laptop.我在 Windows 7 笔记本电脑上使用 Mongo DB 版本 3.4.6。 I connect to MongoDB using Robo 3T version 1.1.1.我使用 Robo 3T 1.1.1 版连接到 MongoDB。 I am trying to use Robo 3T to connect to a remote Mongo server.我正在尝试使用 Robo 3T 连接到远程 Mongo 服务器。

I have edited the bind_Ip option in the mongo.conf file to include the IP Address of the remote server.我在 mongo.conf 文件中编辑了 bind_Ip 选项以包含远程服务器的 IP 地址。

This is the error I receive:这是我收到的错误:

Failed to connect to No chance to load list of databases.连接失败 没有机会加载数据库列表。

When I click on error details, this is what it says: Cannot connect to MongoDB at Error: Network is unreachable.当我单击错误详细信息时,它是这样说的:无法在错误时连接到 MongoDB:网络无法访问。

I am connecting via the default port 27017, which works when I try to connect Robo 3T to the MongoDB on my own laptop.我通过默认端口 27017 连接,当我尝试将 Robo 3T 连接到我自己的笔记本电脑上的 MongoDB 时,该端口有效。

I have attached the error message that I receive.我已附上收到的错误消息。

在此处输入图像描述

Please help me address this issue.请帮我解决这个问题。

I know it's a little late, but i was facing the same problem.我知道这有点晚了,但我遇到了同样的问题。 After i tried a lot of things i solved it just removing the connection from the manage connections window.在我尝试了很多事情之后,我解决了它只是从管理连接窗口中删除了连接。

在此处输入图像描述

Then create it again, i know it sounds dummy but it was the only thing that worked for me然后再次创建它,我知道这听起来很假,但它是唯一对我有用的东西

我遇到了同样的问题,只需将 bindIp 更改为 0.0.0.0 并重新启动您的服务器。

Go Inside bin folder of MongoDB and run mongod command:- C:\Program Files\MongoDB\Server\4.2\bin then open command prompt at this location and run mongod command & then try to connect with Robo 3T .进入 MongoDB 的 bin 文件夹并运行 mongod 命令:- C:\Program Files\MongoDB\Server\4.2\bin 然后在此位置打开命令提示符并运行 mongod 命令,然后尝试与 Robo 3T 连接。 It works for me.这个对我有用。

Also create data folder inside your C: drive & then create a db named folder inside data folder.还要在 C: 驱动器内创建数据文件夹,然后在数据文件夹内创建一个名为 db 的文件夹。 that's it.而已。

I faced similar issue in Mac and couldn't find mongodb.conf to set bindIp from 127.0.0.1 to 0.0.0.0.我在 Mac 中遇到了类似的问题,找不到 mongodb.conf 将 bindIp 从 127.0.0.1 设置为 0.0.0.0。 I installed only Robo 3T and used it.我只安装了 Robo 3T 并使用了它。 Resolved using :使用解决:

     brew install mongo
     brew tap mongodb/brew
     brew install mongodb-community
     vi /usr/local/etc/mongod.conf

Edit the bindIP in this file...By default it is present at /usr/local/etc/mongod.conf编辑此文件中的 bindIP...默认情况下它存在于 /usr/local/etc/mongod.conf

     sudo mongod restart
     brew services start mongodb-community

Now in Robo 3T check if any TLS security settings are enabled.If yes, disable them and now try to connect.现在在 Robo 3T 中检查是否启用了任何 TLS 安全设置。如果是,请禁用它们并现在尝试连接。 :) :)

For the ones that are having issues connecting via URI on Ubuntu, here goes a tip: I gone to TLS tab, then I selected Self-signed-certificate Authentication Method.对于那些在 Ubuntu 上通过 URI 连接时遇到问题的人,这里有一个提示:我去了 TLS 选项卡,然后我选择了Self-signed-certificate身份验证方法。 Also, make sure you have filled the fields correctly in the Authentication tab.此外,请确保您已正确填写“身份验证”选项卡中的字段。 In this tab I selected Auth Mechanism SCRAM-SHA-1 and worked like a charm.在此选项卡中,我选择了 Auth Mechanism SCRAM-SHA-1并像魅力一样工作。

编辑mongo.conf文件并注释以下行: bindIp: 127.0.0.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM