Questions tagged [replicaset]

This tag is used mostly for a MongoDB replica set (a group of "mongod" processes that maintain the same data set) and rarely for a Kubernetes ReplicaSet (the next-generation Replication Controller with set-based selector support).

583 questions
8
votes
3 answers

deployment fails to recreate a successful replicaset

We are using Kubernetes 1.8 to deploy our software in a cloud provider. Frequently, when deploying a specific pod-template, the deployment fails to create a successful replicaset and no instance is created. I am not able to find a better description…
user8722476
  • 81
  • 1
  • 1
  • 4
8
votes
2 answers

Mongoose with ReplicaSet on Atlas

I have a replica set on MongoDB Atlas and this is my mongo shell connection string which connects perfectly: $ mongo…
Biruel Rick
  • 776
  • 1
  • 8
  • 17
8
votes
2 answers

MongoDB 3.0 write lock on oplog collection in replica mode

In replica mode each write operation to any collection in any DB, also writes to the oplog collection. Now, when writing to multiple DBs in parallel, all these write operations also write to the oplog. My question: do these write operations require…
Baruch Oxman
  • 1,616
  • 14
  • 24
8
votes
1 answer

Can MongoDB instance be a member of multiple replica sets?

I would like to know if it is possible to have one mongoDB instance that belongs to two replica sets. E.g: ReplicaSet1 has members 10.10.1.1 and 10.10.2.1 ReplicaSet2 has members 10.10.1.1, 10.10.1.2 and 10.10.1.3
user1584660
  • 856
  • 6
  • 6
8
votes
0 answers

MongoDB and missing index

after migrating replica set to standalone I have some weird issues with the resulting MongoDB setup. For example, an index on a collection is missing. But trying to reIndex() the collection fails as well with this error message: >…
ctp
  • 1,077
  • 1
  • 10
  • 28
8
votes
1 answer

pymongo: Advantage of using MongoReplicaSetClient?

It seems that both MongoClient and MongoReplicaSetClient can connect to mongo replica sets. In fact, their documentation pages are nearly identical - same options, same methods, etc - except that the latter's constructor requires me to specify a…
poundifdef
  • 18,726
  • 23
  • 95
  • 134
7
votes
2 answers

What is the proper way of setting a mongodb replica set using docker and fig?

What is the proper way of setting a mongodb replica set using docker and fig? I was trying to follow official mongodb tutorials to create a fig.yml file with some replica sets but always got blocked by how to call rs.initiate() and…
Felipe Sabino
  • 17,825
  • 6
  • 78
  • 112
6
votes
2 answers

MongoDB docker replica set connection error "Host not found"

I have a local MongoDB replica set created following this SO answer. The docker-compose file: services: mongo1: container_name: mongo1 image: mongo:4.2 ports: - 27017:27017 restart: always command: ["--bind_ip_all",…
Skiptomylu
  • 964
  • 1
  • 13
  • 21
6
votes
2 answers

NoMatchingDocument: Did not find replica set configuration document in local.system.replset

I have a standalone MongoDB instance in my AWS EC2 instance. I'm planning to shift it to Mongo Atlas. The prerequisite is to convert the MongoDB instance into a replica set. Below is the code for my mongo.conf file: # mongodb.conf # Where to…
Anirudh
  • 2,767
  • 5
  • 69
  • 119
6
votes
3 answers

Why don't two Kubernetes ReplicaSets with same selector conflict with each other?

Replica Set 1 apiVersion: apps/v1 kind: ReplicaSet metadata: labels: app: nginx name: rs-1 spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx version: 1.7.1 …
Erkan Erol
  • 1,334
  • 2
  • 15
  • 32
6
votes
1 answer

How to stop Replicaset from restarting?

I started a test if my kubernetes installation is running well, with: $ kubectl run -it hello --image=busybox -- sh However it didn't work. Now I want to just clean up everything before I figure out how to continue. But if I deletethe pod it gets…
erikbstack
  • 12,878
  • 21
  • 81
  • 115
6
votes
2 answers

Automating MongoDB Replica set configuration on Kubernetes

I am creating a MongoDB cluster on Kubernetes using Stateful sets. I have 3 mongo replicas configured in my Stateful set. Now I create Stateful set and service using just one command kubectl create -f mongo-stateful.yaml Then I use the mongo…
Jyothi
  • 71
  • 1
  • 3
6
votes
0 answers

Replicate Mongodb data across 2 servers with write access

I want to be able to replicate data from MongoDB, with minimal latency, across 2 (later more) servers. One server is located in China (behind the Great Firewall) and the other is located in the USA (not behind the Great Firewall). The reason we want…
6
votes
4 answers

MonogoDB Replica Set Status Not changing from Startup to Secondary

I have setup a MongoDB replica set with 3 nodes(vm's running CentOS). One node became Primary other 2 stuck in Startup. When these 2 nodes will change their states from startup to secondary. aryabhata:PRIMARY> rs.status() { "set" :…
Sathibabu
  • 175
  • 1
  • 2
  • 12
6
votes
2 answers

How to specify socket timeout for a MongoDB server slave replica

I get socket error 110 (Connection timed out) when a Mongo database (version 3.0.5) is replicated from primary DB server to slave, more precisely at the time of committing replication of that database (the log of slave is below). I guess probably…
boqapt
  • 1,726
  • 2
  • 22
  • 31
1 2
3
38 39