Mongodb external replica set blocked

I have a 3-member mongodb replica set (version 2.4) in which the admin user for "admin" db does not have the userAdminAnyDatabase role.

This role is required to manage users in all databases.

The roles that I have now are: ["readWriteAnyDatabase", "dbAdminAnyDatabase", "clusterAdmin"]

I tried to update the roles for myself or create a new user, however I do not have permission to access db.system.users in the admin db.

I tried to set noauth = true, but that did not help. When deleting keyFile, db was unable to sync with other members (obviously) and was stuck in RECOVERY state.

I found a similar question that relates to standalone db (without a set of replicas), so in this case it really doesn't help.

What would be the best way to add this role with minimal downtime?

+4
source share
2 answers

I would use mongodump and mongorestore to back up the data, then rebuild the access node and restore the data.

However, this approach should work :

If you blocked yourself, you need to do the following:

  • Stop your MongoDB instance
  • --auth / --keyfile MongoDB
+1

mongo 2.4, , MMAP .

:

  • , , , .
  • auth , .
  • MOVE

- , .

.

!

+1

All Articles