Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-145

Tools don't handle connection string properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: Legacy C++ Implementation
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:
      None

      Description

      The tools just blindly append the value for "port" at the end of "host" even though we kind of treat it like a connection string:

      -h [ --host ] arg mongo host to connect to ( <set
      name>/s1,s2 for sets)

      $ ./mongoimport --host localhost:30001 --port 30001
      2013-09-16T14:58:54.673-0400 getaddrinfo("localhost:30001") failed: nodename nor servname provided, or not known
      couldn't connect to [localhost:30001:30001] couldn't connect to server 
      $ ./mongoimport --host localhost:30001
      // connects fine to mongod running on localhost:30001

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shraya.ramani Shraya Ramani
                Reporter:
                ian.whalen Ian Whalen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: