I managed to get MongoDB running as a three member replica on Windows 8, but I had problems with configuration files. If I used the new (MongoDB 2.6) file format (YAML) and used the replica set name option as:
replication:
replSetName: rs1
(or any of the other variants I had tried in YAML format) I would get "Invalid option: replication" error during the installation. When I switched to old conf. file format and used:
replSet=rs1
I had no problems.
I am very (very!) new to all this, so I am wondering if I was doing something wrong or is it Mongo 2.6 – Windows problem. Thanks!
Best Answer
I was not able to replicate, so here's my successful YAML config file (Windows 7 64 bit, MongoDB 2.6.1):
How I started it:
And then (after an
rs.initiate()
):Note that I had issues when I used tabs to indent, which were resolved when using spaces. Case sensitivity was also a problem, but mainly due to muscle memory from the old config options.