[SERVER-1414] Sever does not recognize self when IP addresses are given in replSetInitiate config Created: 13/Jul/10  Updated: 12/Jul/16  Resolved: 29/Jul/10

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 1.5.5
Fix Version/s: 1.5.7

Type: Improvement Priority: Major - P3
Reporter: Tony Hannan Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongodb-linux-x86_64-2010-07-13
version 1.5.5-pre, git version 22653fdefeea36317cbe2557b9cb039e64512ce6


Participants:

 Description   

Start two mongod's on "1.2.3.4":
1> bin/mongod --replSet yo/1.2.3.4:27018
2> bin/mongod --dbpath /data/db2/ --port 27018 --replSet yo/1.2.3.4

In mongo shell connected to "1.2.3.4":
> cfg = {_id: "yo", members: [{_id: 1, host: "1.2.3.4"}, {_id: 2, host: "1.2.3.4:27018"}]}
> use admin
> db.runCommand(

{replSetInitiate: cfg}

)

{assertion: "can't find self in the replset config", assertionCode: 13279, errmsg: "db assertion failure", ok: 0.0}

log on "1.2.3.4":
[conn3] Tue Jul 13 18:24:40 replSet replSetInitiate admin command received from client
[conn3] Tue Jul 13 18:24:40 replSet replSetInitiate config object parses ok, 2 members specified
[conn3] Tue Jul 13 18:24:40 replSet replSetInitiate exception: can't find self in the replset config



 Comments   
Comment by auto [ 29/Jul/10 ]

Author:

{'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}

Message: use bind() in HostAndPort::isSelf() SERVER-1414
http://github.com/mongodb/mongo/commit/6baeb71caf3b06ceecade2b55274b33d927993d8

Comment by Eliot Horowitz (Inactive) [ 29/Jul/10 ]

method to fix is HostAndPort::isSelf()

Comment by Dwight Merriman [ 14/Jul/10 ]

aaron can you fix this? I'm guessing HostAndPort::isSelf() is not smart enough.

Generated at Thu Feb 08 02:56:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.