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
1
vote
0 answers
relinquishing primary when one node down in three nodes mongo ReplicaSet
I have a ReplicaSet with three nodes, 192.168.254.107:27023, 192.168.254.108:27023, 192.168.2.69:27023.
When 192.168.254.108:27023 is down (unexpected shutdown), then 192.168.2.69:27023 becomes primary.
But after a while, relinquishing primary,…

Yanhui Zhou
- 872
- 6
- 20
1
vote
1 answer
mongos can't write to replica set config server (CSRS) (invalid write concern)
I'm setting up a sharded mongodb, largely per https://docs.mongodb.com/manual/tutorial/deploy-shard-cluster/. When I start the mongos instance, I get a stream of errors along the lines of
getLastError command failed: w: 'majority' is the only valid…

Geoff Pitfield
- 21
- 5
1
vote
2 answers
Connecting to remote replica set from mongo shell?
I have created a 3 member replica set in Amazon cloud.I have set all the requires firewall settings and mongo congigurations.Below is my replica set config :
{
"_id" : "rs1",
"version" : 3,
"protocolVersion" : NumberLong(1),
…

Furious
- 473
- 2
- 5
- 21
0
votes
0 answers
MongoDB Version Upgrade Issues with PSA Replica Set - "local.system.replset.newlyAdded" field isn't getting automatically removed
I have a PSA setup (mongod v5.0.3) running on EC2 r5a series instances.
My goal is to migrate these servers to Amazon Graviton instances (r6g) and Upgrade to mongod v6.0.3.
Current Setup:
P - r5a - mongod v5.0.3
S - r5a - mongod v5.0.3
A - t3a -…

Raveendra Bhat
- 1
- 1
0
votes
0 answers
MongoServerSelectionError: Server selection timed out after 2000 ms
I'm running a mongodb replicaset localy the containers are up the config is okay but when I try to connect with this connection string:"mongosh mongodb://appuser:apppassword@mongo1:27017, mongo2:27017, mongo3:27017/appdb?replicaSet=my-mongo-set"…

hamza zgolli
- 11
- 3
0
votes
0 answers
Mongodb replicaset on docker
I wrote a docker compose file to run a replica set for mongodb I changes all the permission for the key file and on have read permission but stillhave this issue
{"code":30,"codeName":"InvalidPath","errmsg":"permissions on /keyfile/mongo-keyfile are…

hamza zgolli
- 11
- 3
0
votes
1 answer
mongodb replication connect without directConnection
I have a problem configuring the replication with mongo and docker, I can make the replication service work correctly, but if I try to connect with MongoCompass it keeps loading and then the error occurs:
getaddrinfo ENOTFOUND…

Juan Castañeda
- 23
- 3
0
votes
1 answer
How to deploy a local replica set via Homebrew (I'm with MAC OS) Intel7
I would like to know if there is a way to run a local replica set, since Mac OS removed access to the root dir, I can't create new paths like /data/db/ I can't create directories so I can't set up mongod instances or even create keyfiles. It…

johnmayerfan
- 1
- 2
0
votes
0 answers
Mongodb bulk delete causes replicaset crash due to ReadConcernMajorityNotAvailableYet & slow query on oplog.rs
Environment: GKE, 6 nodes, each nodes have 16GB ram (shared \w other pods) and 4 Core (also shared)
Mongodb deployment: bitnami helm version 13.5.X - replicaset type (3 worker and 1 arbiter)
I was trying to remove alot of dirty data (100000 docs…

Zaki
- 1
- 2
0
votes
0 answers
MongoDB Replication in another GKE cluster
I'm using Bitbani MongoDB helm charts, and I deployed Mongodb as a replicaset architecture.
I wanted to use one mongodb as a primary and mongo as secondary. replication should happen on secondary mongo, which is deployed in another GKE cluster.
Can…

pds
- 1
- 1
0
votes
0 answers
MongoDB backup in Secondary node in full backup
We are using MongoDB Community Edition (6.0.1) (PSA) and planning to take a backup while the database is running on a live secondary node(full cluster level backup). Is it possible to do so without impacting production? Can someone please provide…

peace
- 1
0
votes
0 answers
MongoDB replica set storage difference in primary and Secondary node
Mongodb Replica set(PSA)(commumity edition 6.0 version) my secondary node one database size is 560 GB and same database in primary node 500 GB.. help explain and help out
i will check the db.stats() and indexes number also same
primary db.stats()
…

peace
- 1
0
votes
1 answer
Helm charts, how to upgrade mongodb replicaset version
I know the chart is old, as we are still a bit behind with our Mongodb upgrade. On the high level I would like to know should the upgrade be possible like this even with the newer charts? I'm trying to upgrade my mongodb from 4.x to 5.x.
Download…

tahaar
- 1
- 1
0
votes
0 answers
Data are not replicated between MongoDB instance (replication in docker compose)
i’m trying to setup a replicat between 3 MongoDB instance in a Docker environnement. All instances of MongoDB seems to works well. I’m able to be connected to thoses instances with Compass. The replicat seems also to works, a primary is elected and…

MalloryLP
- 5
- 5
0
votes
1 answer
Can't connect to MongoDB replicaSet
I tried to use MongoDB change streams and i need to use replicaSets but mongoDB doesn't let me use it because of load balancer i tried to set it false like…

barankibar
- 56
- 1
- 13