I have 3 mongod demo replicates servers running on my machine. I used the following command to create a replicated server:
F:\>mongod --replSet test2 --dbpath 2 --port 27112 --oplogSize 50 --logpath log.2 --logappend all output going to: log.2
Similarly, I have test1 on port 27111, test2 on port 27112 and test3 on port 27113. However, when setting up, I get an error message:
cfg = { "_id" : "test1", "members" : [ { "_id" : 0, "host" : "localhost:27111" }, { "_id" : 1, "host" : "localhost:27112" }, { "_id" : 2, "host" : "localhost:27113" } ] } > rs.initiate( cfg ) { "errmsg" : "couldn't initiate : set name does not match the set name host localhost:27112 expects", "ok" : 0 }
Now what do I need to do to make it match?
sadaf2605
source share