Trying to get the test setup locally for mongodb replication.
Steps I followed are:
$ mongo --nodb
> replicaSet = new ReplSetTest({"nodes" : 3})
> // starts three mongod processes
> replicaSet.startSet()
The third step is throwing errors. I already have a existing mongo db server running at port 27017 and data of that is stored at different folder in as specified in mongod.cfg
Im trying to create a test replica set on mongod instances on different ports . The steps shown in below image show that 3 ports where selected for replication. Also I have made sure that we have a directory
/data/db
in
{mongodbinstallation folder}\bin\
Still I get the error for path not found.
You created the db/path in the wrong place. It's looking for top level /data/db and you say you created it in the bin directory of where mongodb is installed.
Since this looks like windows, create c:\\data\\db and then rerun this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.