599 questions
0
votes
1
answer
124
views
HMAC keys in system.keys collection and HMAC key monitoring thread
In Mongodb PSSSA (1 primary, 3 secondary, 1 arbiter) deployments when 2 secondary DB’s go down and only PSA is present. when the primary mongo db is restart few times , all database queries start to ...
0
votes
0
answers
72
views
TestContainers Mongo fails to start, but Docker Compose with same config is OK
I have a Docker compose.yml for MongoDB, and this works.
mongodb:
image: mongo:8.0.4-noble
container_name: mongodb
hostname: mongodb
restart: unless-stopped
volumes:
- ...
0
votes
1
answer
45
views
MongoDB bindIP Configuration Issue: Cannot Connect to Replica Set Members when using Hostnames or IPs
I'm an IT student and currently working on a MongoDB Replica-Set. I'm configuring the configuration file for my MongoDB replica set, which consists of three members. All members are registered in my ...
0
votes
1
answer
242
views
How to add to MongoDB replica set members with TLS connection?
Another "awesome" MongoDB documentaion piece:
https://www.mongodb.com/docs/manual/reference/method/rs.add/
What if member being added has TLS connection?? MongoDB don't bother explaining ...
0
votes
0
answers
117
views
Why can't Prisma connect to my MongoDB replica set in Docker?
I'm trying to set up a MongoDB replica set using Docker and connect to it with Prisma.
My setup:
Docker Compose file:
I have the following docker-compose.yml file for the MongoDB replica set:
version: ...
0
votes
1
answer
48
views
Three datacenters and mongoDB replica set with a requirement of local availability to read
We have three datacenters which are connected via private network (not connected to Internet). We use MongoDB to store data. One datacenter is a backup of another and for this we configured a replica ...
0
votes
0
answers
99
views
Connection refused to mongodb after converting standalone to primary only replicaset
I got troble now.
After I converted my standalone mongodb on ec2 to replica set of primary only,
I cannot connect to db with admin user.
So, I looked into mongodb log but there is only "accepted&...
0
votes
1
answer
262
views
How to seed a MongoDB single node replica set when the container starts
I was using a standalone MongoDB instance and had the following:
Docker Compose:
database:
build:
context: .
dockerfile: ./db/Dockerfile.mongodb
ports:
- 12000:27017
...
0
votes
0
answers
249
views
MongoDB getaddrinfo ENOTFOUND host.docker.internal
I tried to create a replica set with on my docker-compose file, the replica set members are up and running and i also can connect with mongosh -- and i can run rs.status().
But i cannot connect the ...
1
vote
1
answer
292
views
MongoDB new Replica Set member's syncSourceHost
When i try to add new replicaSet member to my rs, their syncSourceHost's are always different and certainly not PRIMARY node. They all secondaries. Why is that happening? Is there a default setting or ...
5
votes
1
answer
3k
views
Error "MongoServerError: This node was not started with replication enabled." when setting up replicaset in mongodb (using docker compose)
I'm currently trying to setup a replicaset in my mongodb setup in order to enable Change Streams functionality (which I need for the socket.io MongoDB-Adapter).
Current Setup
I have this service in my ...
2
votes
1
answer
367
views
Blazor Hosted WebAssembly with multiple replicas in kubernetes causing signalr hub issues
I have an application written in Blazor WebAssembly under .Net8. This app is hosted model which means that has a client and server project. For the intercommunication web api is used. The app is using ...
0
votes
0
answers
86
views
Replicaset vs Replicaset Controller Please clarify
Does Replicaset and Replicaset Controller mean the same thing and therefore interchangeable words? Or is there one Replicaset Controller that controls all the replicasets in the cluster and therefore ...
0
votes
1
answer
343
views
AuthenticationAbandoned: Overridden by new authentication session
What does this log mean? I have a replicaset with 3 nodes and this is the line from primary where every php script connects. It repeats constantly every N seconds.
{"t":{"$date":&...
0
votes
1
answer
56
views
Assigning a dedicated Primary node for write operations in MongoDB replica set
Distribution of my MongoDB cluster consisting of 15 nodes across 3 different data centers is as listed below:
DataCenter 1:
Router-1
ConfigServer-1
Shard1Node1 [Primary]
Shard2Node2 [Secondary]
...
0
votes
1
answer
118
views
What is wrong with this docker-compose file? It's supposed to create a MongoDB replica set
I just want to configure a MongoDB replica set for a local development environment and I have the following docker-compose file. Everything seems to initialise well but it seems that the container ...
0
votes
1
answer
694
views
Running a MongoDB-Replica-Set inside docker with x509 authentication: Container Startup fails with tlsMode not enabled,
I am trying to set up a docker cluster/ replica-set with clusterAuthentication set to TLS.
We use mongodb:7 (latest) docker container from the official docker-hub.
Currently we are stuck at startup (...
0
votes
1
answer
1k
views
MongoDB: connect to a replicaSet running on docker (local)
I've doing a POC on mongo replica sets in a local containerized environment. I have been able to create a simple mongodb replica set and initialize it. The three nodes are running on the default port ...
0
votes
0
answers
168
views
Can't run SpringBoot application due mongo replica-set connection error
Docker compose with Mongo replica-set has been run and rs was initialized successfully.
I can connect to each container in standalone mode using mongodb://localhost:27017/db command, but can't do it ...
10
votes
1
answer
9k
views
Collection [local.oplog.rs] not found issue when restarting mongod for setting up replica set
I have followed the official documentation for converting the standalone mongodb instance (local ubuntu machine) to replica set. The part where we restart mongod with --replset flag seems to invite an ...
0
votes
0
answers
168
views
Why doesn't Mongo Replica Node sync compeletly?
Mongo index size monitoring on my heavy collectionI had 3 node mongodb replicaSet cluster (V=6.0.5), One of nodes crashed, now I have a rs with 2 members,
and i'm trying to join 3rd node. My data size ...
0
votes
1
answer
46
views
How do you handle a temporary outage of a member of the replica set in mongodb
When one of the servers in the replica set is taken down or goes down, the application times out trying to connect to the replica set.
don't know what to do differently. Is there a programming pattern ...
7
votes
4
answers
4k
views
How to connect to a mongodb replica set hosted locally in docker from the host machine
I want to create a local MongoDB replica set in docker so I can locally debug a program requiring mongo sessions/transactions. I have the following compose file to spin up the 3 required nodes. I also ...
0
votes
1
answer
1k
views
Kubernetes StatefulSet Database Replicas
I am wondering about what it happens when we have a database like PostgreSQL into Kubernetes stateful set with configured replicas > 1. My question may be obvious or just completely crazy.
The ...
0
votes
0
answers
35
views
How to rollback partial inserts in MongoDB replica sets in presence of writeconcern
Consider a 4 member MongoDB replica set. Consider also that we use writeconcern(w:4) during insertions to achieve consistency. Then, if one of the replica set members is off, the insertion will "...
1
vote
0
answers
41
views
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 - ...
1
vote
0
answers
1k
views
openshift error: "pods "XXX" is forbidden: cpu max limit request ratio per Container is 40, but provided ratio is 160", resources change does nothing
openshift ReplicaFailure "pods "XXX" is forbidden: cpu max limit request ratio per Container is 40, but provided ratio is 160" when trying to create a pod
I tried to change ...
1
vote
0
answers
3k
views
Mongodb Vm.max_map_count is too low in replicaset
I have deployed mongodb to K8s with bitnami helm charts, and it is running as replicaset. When I log into mongodb terminal on secondary I see notification: “vm.max_map_count is too low”.
When checking ...
1
vote
1
answer
1k
views
MongoDB run commands on a specific secondary node
I want to db.runCommand on a secondary node of a replica set, but not the primary (example).
What connection string should I use in mongosh to connect to it?
Connecting to the replica set (e.g. ...
0
votes
0
answers
81
views
Kubernetes request to all instances
I have a k8s cluster with 3 API replicas and 2 TCP server replicas. They communicate using RabbitMQ.
The TCP servers have open TCP connections with clients somewhere identified by an ID.
Now, I wish ...
0
votes
0
answers
209
views
pod scheduling not allowing pod to schedule to a free node
I have 3 environments consisting of a GKE cluster with 1 node pool with 5 nodes (autoscaling from 1-5) and using the same stateful set deployment. 2 of the environments are having no issues, the 5 ...
0
votes
1
answer
290
views
When connecting a Rust based mongodb client (rust mongodb 2.6.0) to a replica set, Is there a way to ignore a failure from one of the hosts?
I'm working on a rust application that reads a mongodb document. The connection is done using a string that should represent a replica set: "mongodb://host1:port1,host2:port2...".
I use ...
0
votes
1
answer
512
views
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 ...
0
votes
1
answer
247
views
Trouble to MongoDB Single Node Replica Set in Docker Container
I am trying to run MongoDB in a Docker container and apply a Single Node Replica Set in an Oracle Cloud Ubuntu environment without using docker-compose.
When I execute rs.initiate() in mongosh, ...
1
vote
0
answers
160
views
Primary mongo node still trying to reach arbiter after removing it
we faced issue regard replication of MONGO replicSet on production so I rebuild the replica set by deleting the local DB and initate it again with just primary node so production application can be up ...
0
votes
2
answers
3k
views
Mongosh doesn't connect to remote replica set but always tries on localhost
I have a weird issue while trying to connect to a remote Mongo replica set.
This is my setup:
on a remote machine I have three instances of MongoDB running on different ports, each belonging to the ...
0
votes
2
answers
311
views
Why does my Flask application only work properly on AKS with one replica?
When I deploy a simple flask application on AKS with one replica, the application is running as expected. But when I deploy the application with two replicas, it was not working as expected. User not ...
0
votes
2
answers
171
views
Is ReplicaSet self-healing?
I know many Kubernetes objects are self-healing and many are not.
In the case of ReplicaSet, I searched online a lot but could not find a direct answer on whether ReplicaSet is self-healing or not. ...
0
votes
0
answers
39
views
Mongodb Replicaset connection string unable to connect every time primary node in outside by using cluster IP
What did you do to encounter the bug?
how to connect outside the cluster every time primary node. i deployed replicaset cluster and i get cluster IP by using this IP then i connect every time primary ...
4
votes
2
answers
1k
views
How does mongo replica set elections behave when some nodes are dead?
Let’s say I have 5 nodes replica set.
3 of them are dead, 2 alive.
How would the majority will be calculated? 5 nodes majority would be 5/2+1=3 but if 3 nodes are dead, will it still look for 3 votes? ...
0
votes
1
answer
593
views
Ansible mongodb_replicaset module causing error
I'm using ansible to deploy mongodb-cluster
I connected to primary_node and created admin user in the admin database:
then updated /etc/mongo.conf to looks like this:
net:
port: 27017
bindIpAll: ...
1
vote
1
answer
343
views
Two deployments with same spec. Then how does the replicsets know which pods they own?
Given below two deployments which only defer in name.
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-1
spec:
replicas: 2
selector:
matchLabels:
app: myapp
template:
...
2
votes
0
answers
423
views
docker-compose, mongodb and replica set. I'm unable to connect to the database
I'm trying to run a single mongodb instance in replica set mode to enable the use of transactions.
I have the following docker-compose.yml:
version: "3.7"
services:
mongo:
...
0
votes
1
answer
271
views
Issue with replication when upgrading Mongodb 4.4.8 to 6.0.4
We have a replica set with three nodes in the docker container hosted on three hosts on a 128 GB filesystem supporting each mongodb data nodes.
Every mongodb container have 5GB of memory limits and 1,...
0
votes
2
answers
361
views
MongoDB 5.0.15/4.4.19 start issue after upgrade
Do anybody manage to start existed relicaset after MongoDB minor version upgrade from official MongoDB stable repo? On previous versions 5.0.14/4.4.18 everything works perfect.
{"t":{"$...
1
vote
1
answer
2k
views
mongoose ReplicaSetNoPrimary error on connection to a mongodb replicaset on docker
Hello everyone
I am currently trying to create a mongodb replicaset with docker and connect it to an expressjs app through mongoose.
Sadly I am getting ome errors when I'm trying to connect and I'm ...
0
votes
2
answers
2k
views
Mongo single node replicaset on Docker, MongooseServerSelectionError: connect ECONNREFUSED
I'm trying to set up a single node MongoDB replicaset on Docker and connect to it within my node app, but the connection is refused. The connection works fine if I use mongo as a standalone instance ...
0
votes
0
answers
78
views
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 url:-
mongodb://...
1
vote
1
answer
2k
views
Statefulset pod stuck in terminating state in case node is in NotReady state
I have a statefulset deployed with 1 replica for jenkins. few days back the node on which jenkins pod was running went into NotReady State . Once Node went in NotReady state, Jenkins pod went in ...
1
vote
1
answer
291
views
Running `mongod --config path` yields Error parsing command line
I was trying to create a mongodb (6.1.1) server with mongod with a custom config, but when I run mongod --config path the console yields Error parsing command line: Multiple occurrences of option &...