I'm testing a replicaSet on my local machine. It's only for testing. I started my local mongodb instance bin/mongod Then started three instances with the following configuration:
mongod --replSet rstest --logpath \data\rs2\2.log --dbpath \data\rs2 --port 27018 --smallfiles --oplogSize 64
mongod --replSet rstest --logpath \data\rs3\3.log --dbpath \data\rs3 --port 27019 --smallfiles --oplogSize 64
mongod --replSet rstest --logpath \data\rs3\3.log --dbpath \data\rs3 --port 27019 --smallfiles --oplogSize 64
Then I started mongo --port 27017 and type the following configuration:
config = {_id:“rstest”, members:[
{_id:0,host:“localhost:27017”},
{_id:1,host:“localhost:27018”},
{_id:2,host:“localhost:27019”}
]};
When I do type the above code and hit enter, I receive the following error message: E QUERY [js] SyntaxError: missing : after property id @(shell):1:101
E QUERY [js] SyntaxError: missing : after property id @(shell):1:101
I'm unable to figure out where is the miss : Is there a way to get the shell screen to display line #s? Or where is that 1:101
Any idea why I'm receiving this error? Where is the missing : should go?