Hi,
i trying to connect to a secondery member in a replicaSet using the driver version 3.6.1:
im getting the exception "java MongoNotPrimaryException: The server is not the primary and did not execute the operation"
with older versions of driver 3.4.2 there was no problem:
code in java :
ListDatabasesIterable<Document> listDatabases = mongoClient.listDatabases();
for (Document dbDoc : listDatabases) {
//....do something
}
is there any way to solve this issue? maybe any configuration in the replicaset?
Best Regards,
Majeed