Not connected to Mongo Master?

Hi, I got some weird errors in my Galaxy log today:

2021-06-09 18:45:56+02:00 Exception in changedobserveChanges callback: Error: Could not find element with id urAtEHLPgcrfEwo9J to change

2021-06-10 08:51:49+02:00 Exception while polling query { … } MongoError: not master and slaveOk=false

Does this mean the server lost its connection to the master database? Am I using the wrong connection string?

mongodb+srv://username:password@m0-lgnh2.mongodb.net/mydatabase?retryWrites=true&w=majority

1 Like

Related post: MongoError: not master and slaveOk=false

I will try to fix it by changing my connection string to:

mongodb+srv://username:password@m0-lgnh2.mongodb.net/mydatabase?retryWrites=true&w=majority &readPreference=primaryPreferred

But apparently this only happens when the Mongo master node is changed, so there’s no way for me to test if this fixes the issue.

1 Like