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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 3.4.0
    • 3.4.2, 3.5.1
    • 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

    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

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

              Dates

                Created:
                Updated:
                Resolved: