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

Tools don't handle connection string properly

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0.0
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: None
    • None

      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
      

            Assignee:
            shraya.ramani Shraya Ramani
            Reporter:
            ian@mongodb.com Ian Whalen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: