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

Not sure why I keep getting this error. The user i added has the proper admin settings.

Screen Capture

1 Like

Hi David_52345,

This is not an error as such. As I can see you are able to access the Mongo shell.

This is just a warning error message which means user is not allowed to perform [getLog] on admin database.

Kanika

4 Likes

So not having admin, even though I set up the user with read/write access, has ripple effects because I cannot connect to the cluster. Is there a different way to give my created user admin privilegs?

Hello David_52345,

Thanks for the note. Have you been able to send queries to the cluster? From your screen capture, it looks like the shell prompt was open. Try sending the command show dbs.

Thanks,
Matt

so i changed the user role to adminAtlas and that seemed to work, but when I entered show dbs, i got the following:

MongoDB Enterprise David-m001-shard-0:PRIMARY> show dbs

2018-12-07T15:56:51.535-0700 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:100:

Any clue what i am doing wrong?

UPDATE

I ignored that error and continued and everything worked fine.