I want to connect to a remote database using Robomongo. I can connect to to database but an error says that:
Failed to load list of databases
What should I do?
I want to connect to a remote database using Robomongo. I can connect to to database but an error says that:
Failed to load list of databases
What should I do?
It took me 7 days to figure it out. When I have upgraded to Robo 3T version 1.3. it started working just fine. My previous version was 1.2.
Good to know if you are having this issue.
In my experience, it is related to failed database user/password authentication. So probably your IP connection to server is successful but you failed to connect to db. I suggest to double check your database username/password and try again.
And better to show what is inside "Show error details".
Go to Connection Settings -> Authentication - Provide Database name, username, password - Now test the connection I ran into the same issue, then I provided the above info which solved my issue
Refer: (Vaibhav's post) Point 3.Populate DB name and username and password How to connect Robomongo to MongoDB
I have faced the same problem after updating the MongoDB version from 3.6 to 4.2 and previously I was using the Robo 3T version 1.2
. So I just updated the Robo 3T
version from 1.2 to 1.3 and it's started working again.
This is because whatever user you are connecting as does not have the privileges to list the databases.
https://docs.mongodb.com/manual/reference/built-in-roles/
Note that a user/role can connect and interact with a specific database/collection, but in order for Robomongo to list out the databases/collections, you need to let it connect to your database using a user that has listDatabases
privileges.
check that your user has read/write & list all Databases privileges.
I had the same error ("failed to load a list of databases"). Due to some reason all my databases and collections got removed. Apparently, Robomongo couldn't handle the situation when there are no databases/collections available on the server.
To solve the issue, I connected to Mongo Shell, created a database, and created a collection there:
mongo (start mongo shell)
use local (create database named local)
db.createCollection("somename")
After that, I could connect to the Mongo server
Update: I've faced this issue again, and this time it has been caused by the fact that it was a new Mongo installation on a virtual machine, and connections from other hosts weren't allowed, so I had to modify bindIP from 127.0.0.1 to 0.0.0.0 in /etc/mongod.conf
net:
bindIp: 0.0.0.0
port: 27017
and restart mongo sudo service mongod restart
Got the same issue when using mongodb version v4.2.0, but the auth settings don't help. Keep getting the following logs when connecting from Robo 3T(i.e.mongoRobo).
2019-09-30T16:41:52.286-0400 I NETWORK [listener] connection accepted from 127.0.0.1:53862 #1 (1 connection now open)
2019-09-30T16:41:52.286-0400 I NETWORK [conn1] received client metadata from 127.0.0.1:53862 conn1: { application: { name: "robo3t" }, driver: { name: "MongoDB Internal Client", version: "3.4.3-10-g865d2fb" }, os: { type: "Darwin", name: "Mac OS X", architecture: "x86_64", version: "17.7.0" } }
2019-09-30T16:41:52.292-0400 E - [conn1] Assertion: Location34348: cannot translate opcode 2010 src/mongo/rpc/message.h 120
2019-09-30T16:41:52.292-0400 I NETWORK [conn1] DBException handling request, closing client connection: Location34348: cannot translate opcode 2010
2019-09-30T16:41:52.292-0400 I NETWORK [conn1] end connection 127.0.0.1:53862 (0 connections now open)
Finally resolved it by upgrading Robo 3T to v1.3(mac)
I just found out that I have to upgrade to the latest version that supports latest version of MongoDB. It worked without any authentication.
I had the same issue when I upgraded mongodb from 3.2 to 5.0 and tried to connect on Robo 3T 1.2.
Then I installed Mongo Compass, issue resolved. Issue would be resolved installing Robo 3T 1.3 too.
If you are using mongod --auth --dbpath /data/db1
command to start MongoDB, remove --auth
and start it.
mongod --dbpath /data/db1
Now Robomongo will be able to connect without authentication. But starting without authentication is not safe. So take another terminal and create a user for your db using mongo
command as described in this article.
use myDB
db.createUser(
{
user: "myUserAdmin",
pwd: "abc123",
roles: [ { role: "dbAdminAnyDatabase", db: "admin" } ]
}
)
Now restart your MongoDB with --auth
. Connect with Robomongo after configuring above authentication details in its connection settings.
mongod --auth --dbpath /data/db1
I had the same problem (using Robomongo), then, I created an user with his password to connect to the database, and now It is working ok
In my case i changed the configurations of my connection:
You go to: Manager connection >> Edit >> authentication >> rename to database to: admin
when I loaded the my connection all databases appeared.
Start mongod
process. Start mongo
process.
On the mongo
shell you have opened type first rs.status()
then rs.initiate()
then rs.status()
.
I faced a similar issue but it was due to my own mistake. I added replication configuration int the /etc/mongod.conf
file (i.e replSet name) and restarted the mongod.service without doing an rs.initiate()
After doing an rs.initiate()
and doing a restart of mongod.service
, my issue was resolved.
This issue only exists with ROBO3T 1.2 update to a higher version and it will go. The reason behind it is version 1.2 takes authentication but when we don't provide credentials in case of local it does not run listdatabase on startup