Error while attempting to show dbs

This is the error I am getting but not sure why

2018-12-05T10:10:37.164+0000 E QUERY [js] Error: listDatabases failed:{

“ok” : 0,

“errmsg” : “Unallowed argument in listDatabases command: filter”,

“code” : 8000,

“codeName” : “AtlasError”

} :

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

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

shellHelper.show@src/mongo/shell/utils.js:914:19

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

@(shellhelp2):1:1

All of the dbs exist (admin, local and video) but the command results in an error

1 Like

What command are you using?

Please try running the command after authenticating with the Mongo.

Kanika

What do you mean by “authenticating with the Mongo” I am seeing the same error for ‘show dbs’ :

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

2018-12-05T12:24:45.593-0800 E QUERY [js] Error: listDatabases failed:{

“ok” : 0,

“errmsg” : “Unallowed argument in listDatabases command: filter”,

“code” : 8000,

“codeName” : “AtlasError”

} :

Hello Farah_55469 and James_59569,

Thanks for the note. What version of MongoDB do you have installed on your machine?

This issue may be related with authentication - make sure you are connecting with a username/password.

Matt

I’ve had the same issue. I can cluster 4.0.4 version and local shell 4.1.6.
After I install 4.0.4 shell everything start works!

I am having the same issue on CentOS 7 . Also when I loaded the movie Data sets , it was a ‘true’ result. But It didn’t show any collections after issuing command 'show collection


Hi Abhishek_16807,

Please install MongoDB current version i.e. 4.0.5 and not the development release ones.

If you have the right ones, then make sure you are authenticated on your cluster using the user who has authorization for show dbs command.

Give the user Read/Write Any database role and then try again.

Kanika

Thanks Kanika , this worked for me

1 Like