Robomongo: Unable to connect Robo 3T to a remote MongoDB server

Created on 11 Sep 2017  Â·  27Comments  Â·  Source: Studio3T/robomongo

Hi. I'm using Mongo DB Version 3.4.6 on my Windows 7 laptop. I connect to MongoDB using Robo 3T version 1.1.1. I am trying to use Robo 3T to connect to a remote Mongo server.
I have edited the bind_Ip option in the mongo.conf file to include the IP Address of the remote server.
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.
I am connecting via the default port 27017, which works when I try to connect Robo 3T to the MongoDB on my own laptop.
Please help me address this issue.

Most helpful comment

Changing bindIp to 0.0.0.0 saved my day!!!! Many many thanks!!!!

All 27 comments

error

I have attached the error message that I receive.

Closed by mistake. Please look into this.

I have had similar issues trying to connect to remote using 3.4.7
"no unix socket support on windows" ?

image

I downloaded the latest version and I tried the replica set option as well.

On Mon, Sep 18, 2017 at 6:24 PM, Karl notifications@github.com wrote:

It looks like you're connecting to a replica set, you need to download the
latest Robomongo (https://robomongo.org/download)

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Studio3T/robomongo/issues/1437#issuecomment-330373258,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AagRbF9MirQjOo8TJtlmgqTWnsmyFd5Zks5sju2LgaJpZM4PS12j
.

same here on windows 10. also tried ssh tunnel and same behavior exit code -8

https://stackoverflow.com/a/46480683 maybe this is the problem, it was in my case. The "bindIp" setting from the config file mongod.conf

Thanks, @rafalfaro18 , Commenting out bindIp from /etc/mongod.conf works for me

RoboT 1.2(Beta version) for Windows resolved this error for me! Check: https://github.com/Studio3T/robomongo/issues/1354

Not trying to connect remotely, just locally, but getting the same error:
"Cannot connect to the MongoDB at localhost:27017. Error: Network is unreachable."

  • tried the SSL certificate fix I read about elsewhere. Didn't work.
  • I looked for the /etc/mongod.conf file, but I don't have this. Even re-indexed my C: drive to ensure a thorough search, but doesn't exist. Is this a fix only for those with a non-Windows installation by chance?
  • yes, I have MongoDB installed, running in a terminal, able to perform queries on existing collections just fine. Also I made sure that I had MongoDB running in the terminal before opening Robo 3T.

Thanks to everyone trying to help with this!

Windows 10 Pro
MongoDB 3.6.5
Robo 3T 1.2.1

I'hve faced the same problem, just change bindIp to 0.0.0.0 and restart your server.

Changing bindIp to 0.0.0.0 saved my day!!!! Many many thanks!!!!

Sorry folks, where to find bindIp? In which folder? I can't connect Robo 3T locally too. I'm using a Macbook Pro

Resolved. I reboot my Mac n its working now. I didn't configure any bindIp. I just reboot my laptop.

i am trying to connect my mongodb but showing the error Network is Unreachable.

Check your firewall. I'm using win10 and after hours of wasting time, I find it is blocked by windows firewall and antivirus.

@rsa408 You save my day! Thank you

I reinstalled mongodb-community, made changes to mongod.conf but nothing worked. But when I restarted mongodb service with sudo, it worked.

sudo brew services restart mongodb-community

It worked for me without making any changes to mongod.conf

Comment vous avez redémarré le service mongodb avec sudo ? j'ai essayé mais en vain

Restart MongoDB service.

my connection with mongodb is successfully established but when i am opening my localhost then the data is not loading from the database.
which kind of problem is this ??how i can resolve this.??

I've done few configurations on my Ubuntu 18 Vagrant box in order to successfully connect MongoDB remotely using Robo 3T GUI. I've explained in the following steps.

  1. On Ubuntu server, to open mongo shell run:
    $ mongo
  2. Inside mongo shell, type following command to create new a admin user.
    ````

    use admin;
    db.createUser({user:"admin", pwd:"password", roles:[{ role: "root", db: "admin" }]});
    ````

  3. By default mongodb is configured to allow connections only from localhost(IP 127.0.0.1). We need to allow remote connections from any ip address. The following change should only be done in your development server. Open up etc/mongod.conf file and do the following change.

    ````

    network interfaces

    net:
        port: 27017
        bindIp: 0.0.0.0   #default value is 127.0.0.1
    

    ````

    Also in the same mongod.conf file uncomment security option and add authorization option as shown below.
    security: authorization: enabled

  4. Save and exit the mongod.conf file and restart mongodb server.
    $ sudo servcie mongod restart

  5. Download and install Robo 3T GUI tool.

  6. On Robo 3T GUI, in the connection settings, you need to do few changes as shown on
    below screen shots.

enter image description here

Enter mongodb admin database username and password which you have created earlier.

enter image description here

Here, I have entered my Ubuntu 18 Vagrant box ssh credentials.

enter image description here

Save the changes and press connect icon to see if the connection is working fine.

I was facing the same problem, but I can solve it by installing Robo 3T 1.3 and import connection details from MongoDB SRV connection string. See this:

Pasos para conectar a la BD remota desde Robo 3T

Remember to replace the user in the connection string and the pass at Authentication Tab

The connection string in the picture is dummy by the way

Thank you ing-jorgevasquez. I was looking for a way to connect robomongo to my cluster at https://cloud.mongodb.com for weeks and until today only your tip worked. Thanks

i have this issue and i fixing downloaded mongo in this URL https://www.mongodb.com/download-center/community

I'm running MongoDB on a Linux (Centos 7) VM and I got this same error when trying to connect from my host or other VM. After trying everything in this post and modifying both my Windows firewall settings and Norton firewall settings, I still wasn't working. In the end, I realised that my Linux box must also be running a firewall. I updated the settings there and finally I was able to connect with Robo3T to my MongoDB instance.

Here are some commands for reference (again, this is for Centos 7) to update the firewall settings and apply the new config:
firewall-cmd --add-service=mongodb --permanent
or (for custom ports like I'm using (the below sets a range of 4 ports)):
firewall-cmd --add-port=27020-270023/tcp --permanent

then to make the new config live, do:
firewalld --reload

or restart it with
systemctl stop firewalld
systemctl start firewalld

I hope that helps someone.

I was facing the same problem, but I can solve it by installing Robo 3T 1.3 and import connection details from MongoDB SRV connection string. See this:

Pasos para conectar a la BD remota desde Robo 3T

Remember to replace the user in the connection string and the pass at Authentication Tab

The connection string in the picture is dummy by the way

I owe you one.

thanks @ing-jorgevasquez, this is working

I was facing the same problem, but I can solve it by installing Robo 3T 1.3 and import connection details from MongoDB SRV connection string. See this:

Pasos para conectar a la BD remota desde Robo 3T

Remember to replace the user in the connection string and the pass at Authentication Tab

The connection string in the picture is dummy by the way

I had same issue, solved as below:

  • Installed the latest version (v1.4 in my case)
  • Chosen Direct Connection instead of Replica Set (If I choose Replica Sets I get set's primary is unreachable error)
  • Checked Perform authentication and changed database name from admin to my database's name
  • Selected Scram SHA 1
  • Unchecked Use TLS protocol

Of course some options might be different in different cases, but it didn't work for me any other combinations.
Note that my DB is on MongoDB Atlas, not local.

Was this page helpful?
0 / 5 - 0 ratings