Error listdatabases failed

Hi there all,

I got connected to my Altus cluster as part of Chapter 2 and lecture " Loading Data into Your Sandbox Cluster" but when i run “show dbs” command… i get below error. However, i have opened atlus cluster for all IPs as instructed in earlier chapter and added user with read/write permissions. Can someone help what is the issue here. I am doing it from macos. Also, I am able to connect and do operations to this Atlus cluster using compass but not using mac terminal.

(1 connections now open to rohitm001-shard-00-00-7tpam.mongodb.net:27017 with a 5 second timeout)

MongoDB server version: 4.0.10

Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]

MongoDB Enterprise rohitm001-shard-0:PRIMARY> show dbs

2019-06-12T14:42:20.465+0530 E QUERY [js] Error: listDatabases failed:{

“ok” : 0,

“errmsg” : “user is not allowed to do action [listDatabases] on [admin.]”,

“code” : 8000,

“codeName” : “AtlasError”

} :

_getErrorWithCode@src/mongo/shell/utils.js:25:13

Mongo.prototype.getDBs@src/mongo/shell/mongo.js:139:1

shellHelper.show@src/mongo/shell/utils.js:882:13

shellHelper@src/mongo/shell/utils.js:766:15

@(shellhelp2):1:1

All, I could resolve this issue by whitelisting my own IP. It was not working if i only had whitelisted all IPs… Hope it helps others too. Happy learning.

1 Like

Well people, it again giving me below error. No clue why would it do that again today when it was all well yesterday after adding my IP in allowable list in Atlus.

MongoDB server version: 4.0.10
Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]
MongoDB Enterprise rohitm001-shard-0:PRIMARY>

Hi @rohit-kumar,

This is just a warning and you can ignore it.

As you can see here, you are already connected to the cluster.

Please let me know, if you have any questions.

Thanks,
Sonali