[SERVER-1956] Cannot initiate replica set on loopback IPs - Created: 16/Oct/10  Updated: 12/Jul/16  Resolved: 21/Oct/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.7.2

Type: Bug Priority: Major - P3
Reporter: Spike Gronim Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Comments   
Comment by Eliot Horowitz (Inactive) [ 21/Oct/10 ]

This isn't easily backportable.

Comment by Kristina Chodorow (Inactive) [ 20/Oct/10 ]

Great! You can actually use the current nightly if you don't want to wait.

Comment by Spike Gronim [ 20/Oct/10 ]

If it works in 1.7.2 I'm happy. I can install that on my test machines.

Comment by Kristina Chodorow (Inactive) [ 20/Oct/10 ]

I think this is an isSelf() issue... I'm not sure if we can backport the isSelf changes, but it works in 1.7.2- (and not 1.6.3).

Comment by Eliot Horowitz (Inactive) [ 18/Oct/10 ]

Kristina - if this turns into an isSelf issue, assign back to me.

Comment by Spike Gronim [ 17/Oct/10 ]

I can confirm that this is happening in 1.7. The only impact on me is in some tests that would like to use a few local mongodbs.

spike-laptop-mac:bin spikegronim$ ./mongod --version
db version v1.7.1, pdfile version 4.5
Sun Oct 17 09:54:39 git version: cee2d0d6816a704126c283401db24c949d5f52a3

(env)spike-laptop-mac:mongodb spikegronim$ cat mongod-127.0.0.2.conf
dbpath = /tmp/mongo2/
bind_ip = 127.0.0.2
replSet=testReplSet
port = 27017

(env)spike-laptop-mac:mongodb spikegronim$ mongo 127.0.0.2
MongoDB shell version: 1.6.3
connecting to: 127.0.0.2/test
> rs.initiate({'_id':'testReplSet', 'members': [

{'_id': 0, 'host': '127.0.0.2:27017'}

]})
{
"startupStatus" : 4,
"info" : "testReplSet",
"errmsg" : "all members and seeds must be reachable to initiate set",
"ok" : 0
}

Comment by Spike Gronim [ 16/Oct/10 ]

Will do, will get back to you with the results. Thanks for the quick response on a weekend, much appreciated.

Comment by Eliot Horowitz (Inactive) [ 16/Oct/10 ]

Can you try the 1.7 nightly?

Comment by Spike Gronim [ 16/Oct/10 ]

Apologies for the blank initial JIRA item, I submitted too soon. I can't create two mongod instances on two different loopback IPs. Is this related to SERVER-1414? Is it by design, since these are loopback IPs? I have tried it with 10. IPs on my eth0 interface and it doesn't work either. Please let me know if you need more information. Thanks.

(env)spike-laptop-mac:mongodb spikegronim$ uname -a
Darwin spike-laptop-mac.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
env)spike-laptop-mac:mongodb spikegronim$ mongo 127.0.0.2
MongoDB shell version: 1.6.3
connecting to: 127.0.0.2/test
Sat Oct 16 12:12:09 Error: couldn't connect to server 127.0.0.2 (anon):1139
exception: connect failed
(env)spike-laptop-mac:mongodb spikegronim$ mongo 127.0.0.2:27017
MongoDB shell version: 1.6.3
connecting to: 127.0.0.2:27017/test
> bye
(env)spike-laptop-mac:mongodb spikegronim$ mongo 127.0.0.3:27017
MongoDB shell version: 1.6.3
connecting to: 127.0.0.3:27017/test
> bye

> rs.initiate({'_id':'testReplSet', 'members': [

{'_id': 0, 'host': '10.1.1.1:27017'}

,

{'_id': 1, 'host': '10.0.0.1:27017'}

]})
{
"startupStatus" : 4,
"info" : "testReplSet",
"errmsg" : "all members and seeds must be reachable to initiate set",
"ok" : 0
}
>

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