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

Shell: mongo --host replSet/Host:Port no longer works

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.2, 3.5.1
    • Component/s: Shell
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Steps To Reproduce:
      1. Create a replica set
      2. Connect from the shell using the the --host parameter: mongo --host replSet/Host:Port
    • Sprint:
      Platforms 2017-01-23
    • Case:

      Description

      In v3.4 the following no longer works

      mongo --host replset/localhost:27018
      MongoDB shell version v3.4.0
      connecting to: mongodb://replset/localhost:27018
      2016-12-05T21:45:22.474+0000 E QUERY    [main] Error: Failed to parse mongodb:// URL: mongodb://replset/localhost:27018 :
      connect@src/mongo/shell/mongo.js:234:13
      @(connect):1:6
      exception: connect failed
      

      Where it used to work in v3.2

      usr/local/m/versions/3.2.10/bin$ ./mongo --host replset/localhost:27018
      MongoDB shell version: 3.2.10
      connecting to: replset/localhost:27018/test
      

      The documentation has an example.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: