MongoDB's replica set uses redundant nodes to provide a high availability and resilience against network partitions of the primary node.
Questions tagged [mongodb-replica-set]
333 questions
0
votes
0 answers
MongoDB replica set not electing new primary after primary is manually stopped
I have a mongoDB 4.0.1 replica set with 4 nodes setup with the following configuration
var cfg = {
"_id": "rs0",
"version": 1,
"members": [
{
"_id": 0,
"host": "mongo-1:27017",
"priority": 3
…

Andrew Edwards
- 1,005
- 1
- 9
- 24
0
votes
1 answer
Timeout exception trying to connect to mongodb single-node replica set
Any thoughts as to what is wrong would be greatly appreciated. Thank you!
Server started with the following flags
mongodb-win32-x86_64-2008plus-ssl-4.0.2\bin\mongod --sslMode disabled --dbpath "C:\Users\foobar\AppData\Local\Temp\sj5ufivo.hgy" --port…

gbackmania
- 772
- 3
- 7
- 17
0
votes
1 answer
MongoDB Write Issue: Different DBs showing different count for same documents
I am trying to BulkInsert certain documents in different collections in 2 Databases in MongoDB.
MongoClient mongoClient2 = this.getMongoClient();
MongoDatabase currentDB = mongoClient2.getDatabase(splits[0]);
MongoCollection…

Niks
- 41
- 2
- 8
0
votes
2 answers
replSetInitiate quorum check failed because not all proposed set members responded affirmatively
I am running 3 mongodb pods and separate service and persistent volume claims for each pod. I want to do the Mongodb replication among the 3 pods. Login into 1st pod and gave the mongo command, then i configured hosts as…

BSG
- 673
- 2
- 13
- 33
0
votes
1 answer
mongodb replica hybrid persistence model
MongoDB supports both Persistence and Non-Persistence mode.
Is it possible to use a hybrid persistence model in mongodb replica nodes?
That means, configure PRIMARY as In-memory storage (for speed)
Configure secondary(s) as data persistence on…

Ajay
- 101
- 6
0
votes
0 answers
How to use a single data disk in mongo db replicat set
I want to create a mongodb replicaset. I am using the following template to deploy a mongodb replicaset.
mongodb-replica-set-centos
The above template used 4 data disks for every MongoDB instance. But I want only one data disk for every MongoDB…

Galet
- 5,853
- 21
- 82
- 148
0
votes
4 answers
Docker container terminating automatically
I am working on a test docker-compose file to run a container with three mongod servers, which form a replica set (One is primary, one is secondary and one is arbiter).
My Dockerfile looks like :-
FROM mongo:3.6.2
MAINTAINER Shanty
RUN apt-get…

Shubham Gupta
- 159
- 1
- 14
0
votes
1 answer
Standard availability for mongoDB replica set cluster of 3 nodes
I have set up a replica set of mongoDB with one primary, one secondary and one arbiter node, mongoDB installed on three independent AWS instances. I need to document overall availability of the replica set cluster formed as per aforementioned…

AIPDS CoE
- 1
- 1
0
votes
1 answer
mongodb showing state as (not reachable/healthy) after adding new secondary in other region
I have 3 mongo nodes running in one region which are mapped to the same replica set with 1 primary and others secondary. I have created another standalone mongo in another region. Now I want to add the newly created node as a secondary to the same…

TKV
- 2,533
- 11
- 43
- 56
0
votes
1 answer
relation between data/db and replicaset on mongodb
i'm beginner on mongodb and i have a question when you install mongodb you have to create a folder /data/db because the data is stored on /data/db.
And on the replicaset you cerate many folder when you have primary replica arbiter etc...
My…

Amal Kostali Targhi
- 907
- 3
- 11
- 22
0
votes
2 answers
How can I add member in mongoDB replicationset?
I am config replication with rs.initiate() command then after I try to add a member to my server IP address using rs.add(xxx.xxx.xxx.xxx:27017) but it's return error like this.
{ "ok" : 0, "errmsg" : "Quorum check failed because not enough
…

Karmdip joshi
- 140
- 2
- 14
0
votes
1 answer
MongoDB Replica Set - 5 data centers - are two arbiters possible?
Is it possible to deploy MongoDB Replica Set with two arbiters? The documentation states that a replica set should contain a maximum of one arbiter, but it doesn't specify if this is a real limitation or just a recommendation.
The planned deployment…

Ezeon
- 166
- 2
- 8
0
votes
1 answer
Trying to add nodes to a replica set "rs0" using rs.add() in the mongo shell of the PRIMARY
The instances are new with no data and were created in AWS Marketplace using a Parse server powered by Bitnami on Ubuntu 14.04.
I tried to add a node using rs.add() but got this error:
rs0:PRIMARY> rs.add( "172.31.39.86:27017" )
{
"ok" : 0,
…

Isaac.S
- 1
- 2
0
votes
1 answer
MongoDB datasize showing differences in show databases and DBPath
Our MongoDB was created with replicaset, and the nodes went down due to some reason. Now after starting up its not starting up/ not able to find out the primary and secondary. From the logs we observed this error.
"[rsSync] no valid sync sources…
0
votes
1 answer
how to write data to multi master instance in mongodb 3.4
How can I write data to multi mongodb instances and keep data synchronous among these instances? Just like in mariaDB.
Currently we use the replica-set in mongodb, but this seems can only support writing data to one node, and this may cause pressure…

ISZER
- 11
- 2