Search code examples
mongodbrobo3tmongodb-cluster

Mongo - Error when saving document: 1 Not primary while writing to db


I'm using Robo 3T (robomongo) to connect mongo cluster. I'm having this error while editing/deleting a document.

Error when saving document: 1 Not primary while writing to db

I googled for this error, many of the solution saying connect to Primary cluster but I don't know How?


Solution

  • You need to set connection string of primary cluster like this:

    1) login to mongo cluster

    2) click on cluster

    enter image description here

    3) click on primary name

    enter image description here

    4) add primary cluster name as a connection string in robomongo.

    enter image description here