Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

273
Vistas
mongodb replica sets -all nodes recovering

i am using a simple mongodb replica set configuration. i have one primary and two secondaries. every thing was fine until i planned to add access control to the mongodb instances.(i know how to add it)

i close down all mongod instances and when i restarted them , all the nodes went into RECOVERING state. i noticed when any (only one at a time) instance is running the state changes to SECONDARY. now to add access controll (use access) i have to be in PRIMARY node which cant come up because as soon as i start all the instances all go into RECOVERING state.

why is this happening? EDIT1: size of database is 700 Mb

EDIT2: i managed to bring back them to a consistent state , it was because i think before i had different settings in mongod.conf file. now i have two secondaries and one primary. now i want to add use access control how should i go about it so that nodes don't go into inconsistent state again.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The solution for me was to use keyFile authentication. So instead of:

security:
    authorization: enabled

use:

security:
  keyFile: <path-to-keyfile>

Basically I followed the instructions at:

https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set

This guarantees a few things:

  1. It simultaneously enforces internal authentication (communication between replicas) and user access control
  2. With keyfile authentication, each mongod instances in the replica set uses the contents of the keyfile as the shared password for authenticating other members in the deployment. Only mongod instances with the correct keyfile can join the replica set.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda