Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28560

Support specifying multiple mongos processes in the shell URI connection string

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 3.4.14
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Case:

      Description

      The mongo shell should allow multiple mongos processes to be specified in a connection string URI, with the expectation that this would connect to the first available mongos process.

      Drivers support this behaviour for the standard connection string URI format, but the mongo shell returns an unhelpful error message in MongoDB 3.4:

      FailedToParse: Cannot list multiple servers in URL without 'replicaSet' option

      The replicaSet option cannot be used with a mongos connection.

      For now the only workaround I have is with a shell script and leveraging the 'echo $?' result to continue iterating through the list of available host:port of mongos processes.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: