justmeandopensource / learn-mongodb

MongoDB stuff
92 stars 128 forks source link

rs.initiate() giving error #6

Open surabhidwivedi opened 2 years ago

surabhidwivedi commented 2 years ago

When I issue rs.initiate( { _id: "cfgrs", configsvr: true, members: [ { _id : 0, host : "localhost:40001" }, { _id : 1, host : "localhost:40002" }, { _id : 2, host : "localhost:40003" } ] } )

I am getting the following error { "ok" : 0, "errmsg" : "No host described in new configuration with {version: 1, term: 0} for replica set cfgrs maps to this node", "code" : 93, "codeName" : "InvalidReplicaSetConfig", "$gleStats" : { "lastOpTime" : Timestamp(0, 0), "electionId" : ObjectId("000000000000000000000000") }, "lastCommittedOpTime" : Timestamp(0, 0) } It will be great if you can help.

luca-demma commented 1 year ago

same problem