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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.4.2, 3.5.1
    • Affects Version/s: 3.4.0
    • Component/s: Shell
    • None
    • Fully Compatible
    • ALL
    • v3.4
      1. Create a replica set
      2. Connect from the shell using the the --host parameter: mongo --host replSet/Host:Port
    • Platforms 2017-01-23

      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.

            Assignee:
            matt.cotter Matt Cotter
            Reporter:
            vick.mena Vick Mena (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: