I am doing MongoDB homework and following the steps, but I ran into a problem: "server is not working with change"
I take the next step:
`"start mongod --replSet m101 --logpath 1.log --dbpath \data\rs1 --port 27017 --smallfiles --oplogSize 64 start mongod --replSet m101 --logpath 2.log --dbpath \data\rs2 --port 27018 --smallfiles --oplogSize 64 start mongod --replSet m101 --logpath 3.log --dbpath \data\rs3 --port 27019 --smallfiles --oplogSize 64
Now connect to the mongo shell and make sure it appears.
mongo --port 27017
You will now create a replica set. Enter the following commands in the mongo command:
config = { _id: "m101", members:[` { _id : 0, host : "localhost:27017"}, { _id : 1, host : "localhost:27018"}, { _id : 2, host : "localhost:27019"} ] }; rs.initiate(config);"
I donβt know where the problem is, someone said that the problem may be that another mongod is working. But at the same time, I have no other mongods.
Thanks!
source share