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
6
votes
3 answers

errmsg bad digit "\" while parsing port 30000 code 93

So, I am following a MongoDB tutorial on Pluralsight and I've been able to create a, b and c database on the same machine. After a successful creation of all three, I run mongo on port 30000 which is the port for my primary database. >mongo --port…
Anjil Dhamala
  • 1,544
  • 3
  • 18
  • 37
6
votes
1 answer

Mongodb replicaset creation with authentication through docker script

I am struggling to find out the solution to authenticate my mongo db replica set through docker script.I am able to achieve the target on native mongo of server but in docker image I am not able to implement the authentication.(I am able to create…
6
votes
1 answer

Arbiter not accepting connections

(MongoDB version 2.6.3) I have a replica set: 2 nodes + arbiter. The replica set works with no problems but I am not able to connect to the arbiter: Failed to connect to myarbiter.com, reason: errno:111 Connection…
Jordi
  • 2,789
  • 1
  • 20
  • 35
6
votes
2 answers

MongoDB two member replica-set

I have a two member replica set (within a sharded cluster), with no arbiter. I know that the recommended design is to have three servers (or an odd number) but right now I have to stick with this design. The problem is that when the primary is down,…
MariusP
  • 472
  • 4
  • 17
5
votes
1 answer

What's the exact reason a pod-template-hash is added to the name of the replicaset when a deployment is created?

https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#creating-a-deployment mentions that a deployment creates a replicaSet but appends a pod-template-hash to the name of the replicaSet and also adds pod-template-hash as replicaSet's…
Prasath
  • 595
  • 5
  • 11
5
votes
0 answers

How to run MongoDB as a single-node replica set using the official mongo Docker image?

Basically, the title already says it all: I would like to run MongoDB as a single-node replica set using the official mongo Docker image, but I don't get how to do this. First of all, I have started the Docker image with the additional --replSet…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
5
votes
5 answers

MongoDB: Can't connect to new replica set master

Trying to set up MongoDB for my Node.JS application. I running this command: mongo "mongodb+srv://cluster0-gjc2u.mongodb.net/test" --username And getting this response every single time. MongoDB shell version v4.2.1 Enter…
Andrew Young
  • 684
  • 1
  • 13
  • 23
5
votes
3 answers

Connect to a remote dockerized MongoDB replica set

In my remote machine, I've set up a docker container machine that I manage using docker-compose. I created 3 docker containers for each MongoDB instance I want in my replica set mongodb_01: image: mvertes/alpine-mongo entrypoint:…
Valerio
  • 3,297
  • 3
  • 27
  • 44
5
votes
2 answers

Kubernetes different container args depending on number of pods in replica set

I want to scale an application with workers. There could be 1 worker or 100, and I want to scale them seamlessly. The idea is using replica set. However due to domain-specific reasons, the appropriate way to scale them is for each worker to know…
nmiculinic
  • 2,224
  • 3
  • 24
  • 39
5
votes
0 answers

MongoDB replicaset not syncing RBAC $external data in 3.0 to 3.2 upgrade

I am wondering if anyone has seen an issue upgrading from 3.0.9 to 3.2.8 with the $external user database not getting replicated? I have an existing 3.0.9 replica set environment running with no encrypted communication (no-TLS) and no auth; the…
doktoroblivion
  • 428
  • 3
  • 14
5
votes
2 answers

MongoDB: replSet can't get local.system.replset config from self or any seed "server is not running with --replSet"

I try to setup a Replica Set on Ubuntu 14.04 x64. First error I run into when trying $ sudo mongod --port 27017 --replSet rs0: replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) I read that > rs.initiate() solves…
Senju
  • 435
  • 2
  • 5
  • 20
5
votes
3 answers

Mongoose / MongoDB replica set using secondary for reads

I recently changed my server setup to include a replica set. The secondary DBs are located in multiple regions around the world to decrease latency. The problem is that I think all of the reads are being done from the master and not from the…
codephobia
  • 1,580
  • 2
  • 17
  • 42
5
votes
1 answer

Does the mongoimport command for a replica set require all replica set members including the arbiter?

I am running MongoDB 2.6.2 and I have a replica set with a primary, secondary and an arbiter. Are there any adverse effects to running a mongoimport command with only one or two of the replica set members? More specifically, does the arbiter need to…
5
votes
0 answers

service mongod start fail with replica set

I'm starting my mongod with the following command: mongod --port 27017 --dbpath /var/lib/mongodb/ --replSet rs0 It works fine and I can configure the replica set. When I try to to launch mongod with service mongod start command it fails with the…
petitnomad
  • 51
  • 4
5
votes
4 answers

MongoDB ReplicaSet - PRIMARY role falls to SECONDARY when only PRIMARY is left

I am investigating using MongoDB ReplicaSet for high availability. But just discovered that in ReplicaSet with 3 nodes, if PRIMARY mongod is the only one left (that is 2 other mongod instances died or were shut down), then after several seconds it…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332