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
Error whet trying to mongodump 3 nodes remote replica set
I stuck trying to implement some backup strategy for our mongodb replica set (3 nodes on aws)
When i trying to make mongodump
mongodump --host="mydb/db1.myapp.co:27017,db2.myapp.co:27017,db3.myapp.co:27017" -o /home/ubuntu/db_backups/1 -d…

Taras Myronovich
- 1
- 1
0
votes
1 answer
Performance drop in upsert after delete with replica set
I will need your help with understanding an performance problem.
We have a system where we are storing set of documents (1k-4k docs) in batches. Documents have this structure: {_id: ObjectId(), RepositoryId: UUID(), data...}
where repository id is…

Matěj Mainuš
- 21
- 2
0
votes
0 answers
Mongodb unable to connect to cluster
We are using mongodb community addition .
We are able to connect to independent nodes primary, and 2 replicas using direct connection.
But when we try to connect to replica set using…

user3184674
- 11
- 2
0
votes
1 answer
Prevent secondary node from pushing changes made to its own copy of the data to the primary node
I have created a replica of 3 nodes where 1 node is primary and another 2 are secondary. I have assigned lower priority to the secondary nodes than the primary node.
I want the ability where changes made in the secondary node should not be…

Prasanna
- 1,752
- 1
- 15
- 27
0
votes
0 answers
Python can't connect to mongodb-replSet
I have a mongodb-replSet called replicaSetOne and it has 2 members.
192.168.0.1 -PRIMARY-
192.168.0.2 -SECONDARY-
Now I have worked on my pyton-skills and in my app I have a simple connectionstring:
mongoConnection =…

don huan
- 33
- 4
0
votes
1 answer
Mongodb Filesystem backup and restore
I am taking backup of MongoDB filesystem backup(including config files).
We are not using sharding in our cluster, having 3node replicaset in place.
Primary Cluster: X_host1, X_host2, X_host3
Secondary Cluster: Y_host1, Y_host2, Y_host3
Taking…

Anto
- 3,128
- 1
- 20
- 20
0
votes
0 answers
Connection String port not detected by MongoDb Compass
I'm running a containerized cluster of MongoDB locally. I have installed MongoDB compass on my Mac pro and trying to connect to it.
The issue is that Compass is not getting the new ports I configured. BTW, the connection through Mongo shell worked…

Houssam Badri
- 2,441
- 3
- 29
- 60
0
votes
2 answers
How to initiate mongodb replica set using nodejs
I'm running the following code for mongodb replica set initialization:
try {
const mongoClient: MongoClient = new MongoClient(process.env.MONGODB_URI || 'mongodb://mongodb:27017', {replicaSet: "rs0"});
const mongoDb: Db = new Db(mongoClient,…

Alex L
- 25
- 3
0
votes
0 answers
OplogStartMissing MongoDB Replicaset
What does OplogStartMissing during Rollback mean in MongoDB? Why does MongoDB needs to find common point ? What is the intention and necessity.
2022-09-19T20:30:54.921+0000 I REPL [rsBackgroundSync] Starting rollback due to OplogStartMissing:…

Vineel
- 1,630
- 5
- 26
- 47
0
votes
0 answers
Delay in get query mongodb replica set
I have a replica set with two members which are working fine except one thing that is when I add something and immediately gets it then it does not return the data, it seems the post query is executed on primary and get on secondary which does not…

Vikram
- 3,171
- 7
- 37
- 67
0
votes
0 answers
MongoDB connection URI with different readPreferences with readPreferenceTags
I have a connection URI
mongodb://host.example.com/?readPreference=secondaryPreferred&readPreferenceTags=region:uswest;readPreferenceTags=
Now, if I use .WithReadPreference(ReadPreference.Primary), I understand that it overrides the read preference…

rand_guy
- 33
- 6
0
votes
0 answers
Writes to MongoDB are lost when primary node changes in a shard replicaset
I am using nodejs driver to write to MongoDB cluster. The cluster is on kubernetes with 2 mongos replicas, 4 shards with PSS setup each and config server with PSS setup as well.
My application (nodejs) connects to mongos (mongos replicas are behind…

devm
- 227
- 1
- 12
0
votes
1 answer
MongoServerError: "No host described in new configuration with {version: 1, term: 0} for replica set rs0 maps to this node," How do I fix this?
Started mongo server using
mongod --port 27018 --dbpath "/usr/local/var/mongodb/data/db0" --replSet rs0 --bind_ip "locahost,0.0.0.0"
And connected to the instance using
mongosh mongodb://127.0.0.1:27018/vndr
Tried to initiate a replica set using…

Dozie
- 103
- 11
0
votes
1 answer
ERROR Configuring mongoDB using Ansible (MongoNetworkError: connect ECONNREFUSED)
I'm trying to configure a replicaset of mongodb using ansible,
I succeeded to install mongoDB on the primary server and created the replica-set configuration file except when I launch the playbook, I get an error of type: MongoNetworkError: connect…

Devops student
- 9
- 1
- 2
0
votes
0 answers
MongoDB OplogStartMissing
I understand that some times MongoDB secondary data becomes stale at which point, we need to perform an init sync from the Primary instance.
But sometimes we see error logs that look like this:
2022-07-22T21:24:20.065+0000 I REPL …

Vineel
- 1,630
- 5
- 26
- 47