Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 531
lazzy_ms Avatar asked Feb 14 '19 11:02

lazzy_ms


1 Answers

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

like image 139
Harsh Patel Avatar answered Oct 03 '22 19:10

Harsh Patel