[SERVER-4393] Adding member in replica by hostname fails Created: 30/Nov/11 Updated: 28/Oct/19 Resolved: 01/Dec/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dmytro Korsakov | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 10.04 |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
For each node in replica set we have hostnames (mongo-0-0 for master, mongo-0-1 for the first slave and so on) in /etc/hosts. 'need most members up to reconfigure, not ok : mongo-0-1:27018', assertionCode: 13144 The problem occurs only in case /etc/hosts is modified after mongod process was started on the master node. Although if we use IP-addresses instead of hostnames, or hack /etc/hosts before starting master's mongod, or if we simply restart mongod when manipulating with /etc/hosts is done everything seems to be alright, replication process begins and we get no errors. But unfortunately neither is acceptable for our setup. |
| Comments |
| Comment by Githook User [ 28/Oct/19 ] |
|
Author: {'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}Message: |
| Comment by Githook User [ 28/Oct/19 ] |
|
Author: {'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto'}Message: |
| Comment by Kristina Chodorow (Inactive) [ 01/Dec/11 ] |
|
You can do it in any order so long as the new set has a majority of servers up. You're right, the documentation didn't go into this very well, I added clarification to http://www.mongodb.org/display/DOCS/Adding+a+New+Set+Member. |
| Comment by Dmytro Korsakov [ 01/Dec/11 ] |
|
Looks like we misinterpreted documentation. Answering your question, Now we start secondary process before registering it on primary and it works just fine with both IPs and hostnames. Mongo documentation states that using 2.0+ I can do it in any order, but there seems to be an exception: the 1st secondary cannot be registered on primary before secondary's process brought up because there is no majority running and if some decide to add unexisting replica to such set, he will need to do it with {force:true}. |
| Comment by Kristina Chodorow (Inactive) [ 30/Nov/11 ] |
|
I'm not exactly clear on what you're doing, can you confirm:
Is that correct? Can you run with -vvv and attach the log from the primary, too? |