[SERVER-2055] Trying to create replica set on local machine. Gives errror "couldn't initiate : can't find self in the replset config" Created: 02/Nov/10 Updated: 12/Jul/16 Resolved: 04/Nov/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | 1.6.3 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Sujit | Assignee: | Kristina Chodorow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
macbook |
||
| Participants: |
| Description |
|
Testing replica sets before moving to production. Started 3 instances of mongod on 3 dbs. config = , , { "_id" : 2, "host" : "local-idinc:10003" } ] > rs.initiate(config); ----------------------------- |
| Comments |
| Comment by Kristina Chodorow (Inactive) [ 04/Nov/10 ] |
|
Great, glad it worked out. Local DNS can be a little funky, the DB is getting better at handling it. |
| Comment by Sujit [ 04/Nov/10 ] |
|
Kristina, Sorry for the late response. In my case: putting localhost for the replica set worked fine. (and proper Thanks for looking into this and the immediate responses. Regards, On Tue, Nov 2, 2010 at 4:07 PM, Kristina Chodorow (JIRA) |
| Comment by Kristina Chodorow (Inactive) [ 02/Nov/10 ] |
|
Please try deleting the data directories (or at least the local.* files) and start up one mongod with: $ mongod --replSet idincrepl --dbpath somewhere --port 10002 Then run: $ mongo local-idinc:10002/admin Please paste the output. |
| Comment by Sujit [ 02/Nov/10 ] |
|
The replica set is not up. Not sure if this helps. Please let me know if I $ mongo local-idinc:10002/admin $ ping local-idinc On Tue, Nov 2, 2010 at 3:43 PM, Kristina Chodorow (JIRA) |
| Comment by Kristina Chodorow (Inactive) [ 02/Nov/10 ] |
|
If you do rs.initiate() (no config) on one of the machines and then run rs.status(), what does it say for name? This might also be a problem with the server figuring out who itself is, does it work for you with the 1.7 branch? There were a number of fixes to this sort of problem that couldn't be backported. |