In ref to mongo dba course trying to create replica set as asked shown by instructor in El Capitano (Single machine only), I get following error. I have three members:
(mongodb was installed using homebrew)
Step I: Setting up config cfg ={ _id :"abc", members:[{_id:0, host:"localhost:27001"}, {_id:1, host:"localhost:27002"}, {_id:2, host:"localhost:27003"}] } { "_id" : "abc", "members" : [ { "_id" : 0, "host" : "localhost:27001" }, { "_id" : 1, "host" : "localhost:27002" }, { "_id" : 2, "host" : "localhost:27003" } ] }
STEP II: Initialize the Config.
rs.reconfig(cfg) 2015-10-05T11:34:27.082-0400 E QUERY Error: Could not retrieve replica set config: { "ok" : 0, "errmsg" : "not running with --replSet", "code" : 76 } at Function.rs.conf (src/mongo/shell/utils.js:1017:11) at Function.rs.reconfig (src/mongo/shell/utils.js:969:22) at (shell):1:4 at src/mongo/shell/utils.js:1017