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

149
Vistas
Why cant I connect to replica set using mongo shell?

I can connect to replica set using following command from mongo shell version 3.2.11. But the same does not works with mongo shell v3.4.1.

mongo --host \
      "replicaSet1/10.10.10.15:27001,10.10.10.16:27002,10.10.10.17:27000" mydbname \
      -u root -p root \
      --authenticationDatabase admin

 [main] Error: Failed to parse mongodb:// URL: mongodb://replicaSet1/10.10.10.15:27001,10.10.10.16:27002,10.10.10.17:27000/mydbname :

I have read here that replica set address format has not changed since v 3.4.1 release.

Why cant I connect to db ? What is the parse error, as per new format(if its there).

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

0

This is a known regression in MongoDB 3.4.0/3.4.1: SERVER-27289: mongo --host replSet/Host:Port no longer works. A fix has been committed for the upcoming MongoDB 3.4.2 release.

You can work around this in an affected 3.4.x mongo shell by using the standard MongoDB Connection String URI format instead:

mongo --host mongodb://10.10.10.15:27001,10.10.10.16:27002,10.10.10.17:27000/mydbname?replicaSet=replicaSet1

You can also use a standard MongoDB Connection String as a plain argument (i.e. without the --host parameter):

mongo mongodb://10.10.10.15:27001,10.10.10.16:27002,10.10.10.17:27000/mydbname?replicaSet=replicaSet1

I have read here that replica set address format has not changed since v 3.4.1 release.

Support for using the standard MongoDB Connecting String format in the --host parameter was added in MongoDB 3.4 in order to align the mongo shell connection string syntax with the format used by all official drivers.

This change is currently not noted in the MongoDB 3.4 manual, so I've raised DOCS-9808 to clarify.

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