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

Shell cannot parse $ when connecting to db from command line

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Shell
    • Labels:
    • Operating System:
      ALL
    • Case:

      Description

      3.4 mongo shell cannot parse $ when connecting to $external from the command line. This functionality worked 3.2 shells and earlier.

      Hatcher:~ danielhatcher$ mongo --host localhost \$external
      MongoDB shell version: 3.2.12
      connecting to: localhost:27017/$external
      Server has startup warnings:
      2017-03-10T10:13:04.305-0500 I CONTROL  [initandlisten]
      2017-03-10T10:13:04.305-0500 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
      2017-03-10T10:13:04.305-0500 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
      2017-03-10T10:13:04.305-0500 I CONTROL  [initandlisten]
      >
      

      Hatcher:~ danielhatcher$ mongo --host localhost \$external
      MongoDB shell version v3.4.2
      connecting to: mongodb://localhost:27017/$external
      2017-03-10T10:39:31.380-0500 E QUERY    [thread1] Error: Failed to parse mongodb:// URL: mongodb://localhost:27017/$external :
      connect@src/mongo/shell/mongo.js:237:13
      @(connect):1:6
      exception: connect failed
      

        Attachments

          Activity

            People

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM)
            Reporter:
            daniel.hatcher Danny Hatcher (Inactive)
            Participants:
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: