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

Shell cannot parse $ when connecting to db from command line

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Server Development Platform
    • ALL

      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
      

            Assignee:
            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: