Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.4.3
-
None
-
Linux
Description
I have a three MongoDB servers.
I want to first mongodb server replica set master node and second/third server slave nodes.
Master Server mongodb.conf
logappend=true
bind_ip = 10.201.1.214
port = 27017
fork = true
cpu = true
master = true
replSet = testRep
Second server mongodb.conf
logappend=true
bind_ip = 10.201.1.215
port = 27017
I'm trying rs.initiate() command but i get an error.
rs.initiate({_id: 'ebamongo',
members: [
{_id: 0,host: '10.201.1.215:27017'},
{_id: 1,host: '10.201.1.216:27017'}]
})
output:
{
"ok" : 0,
"errmsg" : "couldn't initiate : can't find self in the replset config"
}
What should I do?