0

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.

Screen capture

rodrigoap
  • 7,405
  • 35
  • 46

1 Answers1

1

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.

Asya Kamsky
  • 41,784
  • 5
  • 109
  • 133