please help me resolve this
Just chande mongosh by mongod
1 Like
sorry, you are already inside the instance so you can use the command rs.initiate(), and then add the necessary members with rs.add()
1 Like
Hi @RAJYAVARDHAN_SINGH_RATHORE ,
you’ re trying to start a replica set inside the mongoshell, with the mongosh command and is wrong!
You need to do something like that (for example in linux):
[root@com ~]# mongod --logpath "path_for_log" --dbpath "path_for_data" --replSet "name" --bind_ip 0.0.0.0 --fork etc...
I hope is useful!
Regards
1 Like