[DOCS-9508] Docs for SERVER-20965: rs.initiate() with no parameters can choose a poor hostname Created: 05/Dec/16  Updated: 27/Oct/23  Resolved: 08/Dec/17

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Emily Hall Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: delete-docs-tickets, future-docs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 6 years, 9 weeks, 5 days ago

 Description   

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"
        }]
    }



 Comments   
Comment by Kay Kim (Inactive) [ 08/Dec/17 ]

Opened too soon.

Generated at Thu Feb 08 07:58:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.