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

Shell: mongo port=XXXXX connects to default port but misleads user with message

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Won't Fix
    • 3.0.14, 3.2.10, 3.4.0-rc3
    • None
    • Shell
    • ALL
    • Hide

      mongod --dbpath . --logpath mongod.log --fork
      mongo port=27018
      

      Show
      mongod --dbpath . --logpath mongod.log --fork mongo port=27018

    Description

      The mongo shell connects to the default port when the connection string is incorrect and it prints a misleading message to the user leading them to believe they have connected correctly.

      • v3.0.14

        mongo port=27018
        MongoDB shell version: 3.0.14
        connecting to: port=27018
        

      • v3.2.10

        mongo port=27018
        MongoDB shell version: 3.2.10
        connecting to: port=27018
        

      • v3.4.0-rc3

        mongo port=27018
        MongoDB shell version v3.4.0-rc3
        connecting to: mongodb://127.0.0.1:27017/port=27018
        

      The latest version is probably the least likely to be confusing but perhaps a failure to connect would be more educational to the user.

      Attachments

        Activity

          People

            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            vick.mena Vick Mena
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: