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
Mongo replication issue in system.user database
I am able to add a user to systems.users collection when I register from primary node, But when I add a user from secondary node, value is not getting updated in the primary and so the replication fails, primary is in US and secondary is in…

Prabhu Kathiresan
- 57
- 3
- 7
0
votes
1 answer
MongoDB Replica Set and URL server ordering
I am using nodejs and I have a connection URL:
config.mongodb.url = 'mongodb://test-mongodb-2,test-mongodb-1,test-mongodb-3:27017/test_db?replicaSet=test_rs';
If test-mongodb-2 is not the primary, the connection fails with:
not master and…

Rob
- 187
- 1
- 7
0
votes
1 answer
Mongo replication performance issue when retrieving document from replica set
I have one primary and two secondary replica sets and there is a performance issue when I retrieve document from my node server. So is there a way to increase the performance?

Prabhu Kathiresan
- 57
- 3
- 7
0
votes
1 answer
Add new member in mongo and preventing the error exception in application
I have three instances on EC2, each one with service mongo, set up with replica set, ie, a primary (192.168.1.1), a secondary (192.168.1.2) and an arbiter (192.168.1.3).
I have several applications that connect with mongo.
My question is as…

pedrosalpr
- 155
- 1
- 9
0
votes
1 answer
what happends to a write request to Mongo cluster, during Mongo primary stepdown and election
I have an application constantly writing to a MongoDB replica set (for example 1 primary, 2 secondary).
I'm wondering: if I force current primary to step down, then an election for new primary could take a couple seconds to finish.
But during this…

keypoint
- 2,268
- 4
- 31
- 59
0
votes
2 answers
replicaSet db status after failover and recover
My mongodb version is 3.2.4.
I have a replicaSet with 2 database nodes and 1 arbitor.
All db are running fine for a long time at my customer site. One day, the primary db was brought down for maintenance. After about 2 hours, the-was-primary was…

Nancy Chen
- 23
- 4
0
votes
2 answers
mongodb failover connection
I have a nodejs app that connects to mongodb.
Mongodb allows replicaset client connection to provide a level of resilience.
e.g "mongodb://localhost:50000,localhost:50001/myproject?replicaSet=foo", the client first connects to localhost@50000 and if…

nick
- 1,431
- 2
- 11
- 9
0
votes
2 answers
Can i use replica set name to connect via mongo-connector
I would like to know, is there a way we can replicate from one mongo replica set to another via mongo-connector? As per mongo documentation we can connect two mongo instances via mongo-connector by using a command as in the example below, but I…

Prasanna
- 141
- 1
- 3
- 17
0
votes
0 answers
Parse Server - Cannot connect to MongoDB in defiance of sharding and replication
We deploy a MongoDB Sharded Cluster on AWS with 3 Shards. Each shard has a replicaSet with 3 members, 1 config server and 3 mongos.
[ shard 1 ] [ shard 2 ] [ shard 3 ]
[ mongos0 ] [ mongos1 ] [ mongos2 ]
[ config0 ] [ config1 ] [ config2 ]
[ (p) md0…

Eltorrooo
- 157
- 2
- 15
0
votes
1 answer
php connection error with mongo replica set
I have 3 instances on EC2, each with elastic IP, and each running mongo version 3.2. All are in the replica set by the type name. The bind_ip settings in mongod.conf are configured with the IP 0.0.0.0.
I'm trying to connect mongo through php. I…

pedrosalpr
- 155
- 1
- 9
0
votes
0 answers
WriteConflictException not allowed in saveState - mongodb with replica set
We use a MongoDB replica set, where after some time the primary set will throw the exception below and cannot recover from it. The error occurs only when we run the server in Replicaset mode.
Invariant failure !"WriteConflictException not allowed…

UshaP
- 1,271
- 2
- 18
- 32
0
votes
1 answer
How to connect to a MongoDB sharded cluster
I setup a cluster on aws that looks like this
- mycluster
--- shard0
----- node0 : P
----- node1 : S
----- node2 : S
--- shard1
----- node0: P
----- node1: S
----- node2: S
--- shard2
----- node0: P
----- node1: S
----- node2: S
I want to connect…

Eltorrooo
- 157
- 2
- 15
0
votes
1 answer
mongodb replica set is ok but does not replicate
I've created my mongodb replicaset and all is correct except is not replicate in remote host, but I've tried to access remote pc at the port 27017 and working properly.
I created the database on the remote PC to see if this solved but nothing, I…

Landaida
- 134
- 2
- 8
0
votes
1 answer
Mongo replica set config
I configured a 3 node replica set and uninstalled mongo when my virtual memory limit exceeded then as i was starting my mongo replication I couldn't get these commands to work.
rs.initiate()
rs.reconfig()//with config params
My previous replica set…

Prem Reddy
- 11
- 1
- 5
-1
votes
2 answers
How I can switch to secondary node from primary
I'm using a replicaset with 3 nodes. Node primary with name n1 and port 27018, secondaries n2 port 27019 and n3 por 27020.
I would like to switch to any secondady node from primary. I've tried with mongo -host n2 -port 27019 but not work for me…

David Molina
- 141
- 1
- 7