Replica Set Error Code 76

后端 未结 2 2045
野的像风
野的像风 2021-01-28 17:28

In ref to mongo dba course trying to create replica set as asked shown by instructor in El Capitano (Single machine only), I get following error. I have three members:

相关标签:
2条回答
  • 2021-01-28 17:41

    Make sure you have the replSetName name configured in /etc/mongod.conf

    replication:
      replSetName: "somename"
    

    Then restart your mongod.

    sudo service mongod stop
    sudo service mongod start
    sudo service mongod restart
    
    0 讨论(0)
  • 2021-01-28 18:00

    You are not running replica set with the repl set name.The solution is to set a replication set name in the mongod config file using the paramater --replSet.

    eg) --replSet=test_replica

    Once changes are done in config file restart the server.

    0 讨论(0)
提交回复
热议问题