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
1 answer
How to edit Mongo connection string?
After converting the standalone to the replica set the connection string has not been modified, but it works fine.
If I type mongo the connection string is still the same as it was before the conversion…

eceyou
- 23
- 1
- 4
0
votes
1 answer
Unable to create mongodb replica set on kubernetes pod
I am trying to create MongoDB replica-set on kubernetes. I have a namespace 'global' and I have deployed mongodb in that and I have exposed MongoDB pod using a headless service.
Deployment file looks like-
apiVersion: v1
kind: Service
metadata:
…

vishaltewatia
- 47
- 4
0
votes
1 answer
MongoDB currentOp() and Cursor.explain() shows different result for the same query
I've been using MongoDB 3.2 for years, and I found that currentOp() and Cursor.explain() shows different result for the same query.
I found that several queries are being executed very long time(20+ sec), I thought it's not possible because I tested…

Jake
- 3
- 2
0
votes
1 answer
mongodb - Replica set creation error: Quorum check failed because not enough voting nodes responded
I am configuring a mongodb replica set. From my current primary node, when rs.add('host1:27017'), it yields this error
Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded; the…

necroface
- 3,365
- 10
- 46
- 70
0
votes
1 answer
Can I have multiple replica sets per deployment?
I am trying to set up multiple RocketChat servers each with their own databases. As Rocketchat Depends on MongoDB, according to my limited knowledge, each mongod replicaset can only serve 1 Rocket Chat instance at one time. Is it possible to have…
0
votes
1 answer
mongodb replicaset of one autoscaling
Will it autoscale database ram/disk and instances? Specifically will it autoscale instances and work if I create a simple replicaset of one node for the oplog alone? It doesn't support creating replicaset of 1 in interface, so I worry that it will…

janat08
- 1,725
- 2
- 16
- 27
0
votes
1 answer
MongoDB replica set quorum config (network partitioning behaviour)
I use mongodb 4.0.10. I want to establish a quorum for a cluster of one primary node and two secondary nodes as written here. When the number of nodes is less than the quorum, 3 nodes in my case, cluster goes to readonly (no election).
I`ve tried to…

Andrii Matiiash
- 499
- 6
- 18
0
votes
1 answer
How to display line # in Mongodb Shell- ReplicaSet config Error
I'm testing a replicaSet on my local machine. It's only for testing.
I started my local mongodb instance bin/mongod
Then started three instances with the following configuration:
mongod --replSet rstest --logpath \data\rs2\2.log --dbpath \data\rs2…

Marco
- 1,051
- 19
- 41
0
votes
1 answer
How to find primary host of MongoDB replica and access in Python
I've one primary host as mongo1.ppshein.net, secondary host as mongo1.ppshein.net and arbiter as mongo3.ppshein.net, and configured MongoDB replica as above shown in AWS EC2. And in each of MongoDB config file, bindIP is as its host name and App…

PPShein
- 13,309
- 42
- 142
- 227
0
votes
1 answer
how to connect mongodb replica set created with helm charts in k8s cluster
I am using stable-mongodb-replicaset helm chart for creating mongodb inside my k8s cluster hosted on Azure. mongodb has three replicas.stable-mongodb-replicaset acts as an sub chart.
my release name is skeleton.
i can see my mongodb replicaset is…

Ganesh Pol
- 413
- 1
- 8
- 29
0
votes
2 answers
mongodb not using local database in replica set
I have 4 servers each hosting a website and a mongo replica set.
MongoDB version: v3.4.13
Driver: PHP
Server 1 is PRIMARY.
Located on the west coast
Server 2 is SECONDARY with tag: { location: 'east' }
Located on the east coast
I'm connecting…

Andrew
- 3,545
- 4
- 31
- 37
0
votes
1 answer
Problem with MongoDB Replication - AWS and Windows Hosts
I've been messing with this for a bit now and I have managed to crawl through the configuration given the documentation is rather non existent.
Right now the problem is that my ReplicaSet Secondaries cannot get a heartbeat to my Primary. I am able…

A. Smith
- 446
- 7
- 8
0
votes
1 answer
MongoDB v4.0.0 Replica Configuration failed to Setup
I'm trying to configure replication in 3 machines (OS UbuntuMATE 18.04) with MongoDB v4.0.0 installed.
I'm using Deploy a MongoDB Replica Set link for a reference. and tried to configure as follows...
Step 1:
Update all three machine's host file…

Vivek Buddhadev
- 197
- 1
- 22
0
votes
1 answer
Is it save to run a mongodb replica set with 3 containers in production on the same server?
I am currently trying to get mongodb transactions working in our project.
We currently have only have one server.
Is it a good idea to run 3 containers for a replica set on the same server?
Or would it be better to run only one container as a single…

LandoR
- 908
- 1
- 5
- 22
0
votes
1 answer
How can I dump whole database or individial database using mongodump?
I am trying to backup mongoDB database using mongodump from replicaset. Script I am using works fine to dump db from remote to local. Same script errors out saying authentication failed when I trying to dump from replicaset.
Is there a simple way I…

user557657
- 856
- 1
- 12
- 35