“This node was not started with the replSet option”

北城以北 提交于 2019-12-02 01:30:27

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!