MongoDB Atlas: user is not allowed to do action find on system.indexes

6,369 views
Skip to first unread message

Yuriy Yunikov

unread,
Apr 22, 2018, 8:31:51 AM4/22/18
to mongodb-user
I'm using MongoDB Atlas and I've recently started to get this error on my MongoDB replica:

> user is not allowed to do action [find] on [mydb.system.indexes]

Nothing really has changed, so I'm wondering what can be  an issue. The user has `readWrite` role on `mydb` and from the [docs][1] it looks like it should have the right to do it. Also, I've tried to change the user to admin user which has any rights, but still got this error. Interesting that `system` collection doesn't exists in `mydb` but Spring Data tries to query it and gets this error.

Here is a full log from mongo:

    Error: error: {
    "ok" : 0,
    "errmsg" : "user is not allowed to do action [find] on [mydb.system.indexes]",
    "code" : 8000,
    "codeName" : "AtlasError"
    }

MongoDB connection URI looks like this:

    spring.data.mongodb.uri=mongodb+srv://[USER]:[PASSWORD]@[MONGO_URL].mongodb.net/mydb

I'm using Spring Boot `2.0.1.RELEASE` with mongo java driver of version `3.6.3`. Version of the Mongo replica is `3.4.14`. Any idea what's going on and how this can be fixed? Upgrading user role doesn't help here.

vishal...@mistminds.com

unread,
Apr 23, 2018, 2:28:09 AM4/23/18
to mongodb-user
Even I am facing exactly the same issue. You can check the issue at https://stackoverflow.com/questions/49974594/reading-of-dbname-system-indexes-failed-on-atlas-cluster-by-mongobee-after-getti  But few days back it was working fine with the same configuration.
Reply all
Reply to author
Forward
0 new messages