Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9508

Docs for SERVER-20965: rs.initiate() with no parameters can choose a poor hostname

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Engineering Ticket Description:

      Calling rs.initiate() (i.e. without a configuration object) will cause MongoDB to create its own replicaSet configuration. Unfortunately, for "host" it chooses the computer name without the domain name. Of course this is only a problem when working with computers across different domains, which is probably why no one has noticed it before now.

      Workaround: call rs.initiate with a configuration object like this:

          {
              _id: "rs0",
              members: [{
                  _id: 0,
                  host: "host.domain.tld:port"
              }]
          }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 20 weeks, 6 days ago