“This node was not started with the replSet option”

后端 未结 1 986
我寻月下人不归
我寻月下人不归 2021-01-19 23:16

I am studying the MongoDBUniversity\'s M101P: MongoDB for Developers course.

I am using WiredTiger on MongoDB 3.2.

相关标签:
1条回答
  • 2021-01-19 23:36

    So as I finished writing this question, the answer just came to me like a lightbulb, which seems to happen often... but this time I thought I would leave the answer here for anyone else who has struggled with this, considering the somewhat lack of questions/answers on this topic on the forum.

    It was a simple case of the default port being used when running my config file.
    I was using mongo < init_replica.js to run my config and unify the servers to create the replica set.

    By simply adding a port used by one of the valid servers, it ran correctly:

    mongo --port 27020 < init_replica.js 
    

    Woe is me for that one, but I hope this helps those also studying the course who find themselves stuck somewhere similar.

    Jake

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