The port is set to 0 (instead of DEFAULT_PORT) if the optional port is not specified in the replica set config record

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.1.5
    • Affects Version/s: 1.1.4
    • Component/s: None
    • None
    • Environment:
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      ?I've submitted a pull request for this issue:

      https://github.com/mongodb/mongo-ruby-driver/pull/14

      Note the following config record containing hosts without the [optional](http://www.mongodb.org/display/DOCS/Replica+Set+Configuration) ":port" specified. When a connection is made, the discovery code will set the port to 0 when the host string is split on ":".

      I also noticed that @arbiters is not being set for this config record, but I didn't attempt a fix for this.

      >db.runCommand("isMaster")

      { "setName" : "stage1", "ismaster" : true, "secondary" : false, "hosts" : [ "mongo01.customink.com", "mongo02.customink.com" ], "arbiters" : [ "oa.customink.com" ], "ok" : 1 }

            Assignee:
            Kyle Banker (Inactive)
            Reporter:
            Alex Stupka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: