Questions tagged [mongodb-4.2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
37 views

MongoDB account -- is it an administrator's account?

I'm more familiar with MySQL, but in my new workplace, I have to look after a MongoDB database (MongoDB 4.2.18 with Mongosh 1.1.9 running on Ubuntu 18.04.6 -- yes, it's old; upgrading is a problem for ...
Ray's user avatar
  • 113
1 vote
1 answer
798 views

Mongodb replica stuck at STARTUP

I have 4 Servers: Mongo1(with secondary and arbiter), Mongo2(primary). Mongo3, Mongo4 Mongo1 and Mongo2 were initiated and successfully running for months. (1 and 2 + arbiter are connected over the ...
AATHITH RAJENDRAN's user avatar
0 votes
1 answer
241 views

MongoDB OplogStart Missing

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-...
Vineel's user avatar
  • 103
0 votes
1 answer
536 views

MongoDB aggregation. Trying to use switch in map

Hi im trying to use a switch statement inside of map to increment a value depending on the case but im getting MongoServerError: $switch found an unknown argument: $$favcast is this viable? db....
bbest12g's user avatar
0 votes
1 answer
423 views

Mongodb continuous schedule and cancel catchup takeover on replica set member

We have a mongodb 4.2 (stable branch) replica set with three members. It was working for several months without problems. Yesterday one of the secondary members started to do very strange things. I ...
nagylzs's user avatar
  • 411
0 votes
1 answer
276 views

Queries on Mongo Secondary are not equally distributed

I have a MongoDB cluster setup with one primary and 2 Secondaries in a single shard setup. Every night we have a high load but one day and most of the read APIs have a SECONDARY_PREFERRED read ...
Avinash Vundyala's user avatar
0 votes
2 answers
593 views

Is there an automatic way for a secondary member to promote to primary member in a replica set?

Here is my setup: Node 1 = 10.1.0.1 (Primary) - priority 1 Node 2 = 10.1.0.2 (Secondary) - priority 1 Node 3 = 10.1.0.3 (Secondary) - priority 0 In the event of Node 1 failure, Node 2 will be set to ...
JRA's user avatar
  • 139
0 votes
1 answer
2k views

Rename all databases when doing a mongorestore?

I have a datadump but I need to change the name of every database while restoring them, if a database is named "customers" it needs to be "customer2", "products" to "...
DB guy's user avatar
  • 69
0 votes
1 answer
1k views

MongoDB Aggregate Poor Index Usage

I've been trying to understand the MongoDB Aggregate process so I can better optimize my queries and I'm confused by usage and $match and $sort together. Sample DB has only one collection people [{ ...
Stevie H's user avatar
0 votes
1 answer
80 views

MongoDB replica set and db.stats()

We just added a node to our replica set. After the node's state switched to SECONDARY, I do use obs db.stats() on both the PRIMARY node and the new SECONDARY. PRIMARY SECONDARY &...
DavidL's user avatar
  • 1
2 votes
2 answers
226 views

Failed to start mongo.service on ubuntu 16.04 after update from 4.0 to 4.2

I'm trying to update my MongoDB installation from 3.6 to the latest version [4.4] on Ubuntu16.04 using apt-get. Going from 4.0 to 4.2 I faced a problem during the startup process after updating the ...
Anas A Obeidat's user avatar
1 vote
1 answer
1k views

Oplog incremental backup failure

I have scheduled oplog incremental dump using mongodump but it fails very often on majority of the servers. I have a shard cluster with around 200GB of oplog size defined and around 30-40 hours of ...
Divyanshu Soni's user avatar
1 vote
1 answer
1k views

Consequences of increase Oplog to large size

I'm trying to add a new member (m*-server: 4.2.7) in my replica set (m*-servers: 4.2.1), and it can't sync in time, after the initial sync it changes state to RECOVERING and have: (~ 4.3 - 6.31 hrs) ...
Red Black's user avatar
5 votes
1 answer
13k views

MongoDB - Replication Oplog Window has gone below 1 hours

I'm working with MongoDB Atlas and I have a cluster of 3 with M30 and 100gb of storage. My current usecase is the following: - An user dispatches one search in my platform - The platform dispatches ...
Tzn's user avatar
  • 93
0 votes
1 answer
60 views

Mongo assigning user permsions issue on docker

I'm using docker image mongo and I extend it to create a user and assign permissions on image build with such a line COPY init.sh /docker-entrypoint-initdb.d/ Here is the init.sh: #!/bin/bash set -e;...
Bogdan  Dubyk's user avatar
0 votes
1 answer
643 views

Mongo slow startup after upgrade to 4.2.5

I have upgraded the MongoDB replica set, which consists of 3 members, from 4.0.11 to 4.2.5. After upgrading, startup lasts about 5 minutes. Before upgrading it was instant. It is related to ...
Dancica's user avatar
0 votes
1 answer
477 views

mongorestore - documents fail validation

The similar question already have been asked: How to validate a mongorestore But how to actually validate the documents in mongodumb and mongorestore? And also - can I see the documents that fail ...
Xeizzeth's user avatar
  • 101
0 votes
3 answers
10k views

Failed to start of service MongoDB community4.2 using Homebrew in Mac OS Mojave 10.14

Error message while starting the mongoDB service. Error: Permission denied @ rb_sysopen - /Users/syedahmed/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist I installed/reinstall the ...
Syed Ahmed's user avatar
0 votes
1 answer
686 views

MongoDB 4.2 using change streams with read concern majority disabled in a PSA deployment

I currently run a PSA (Primary, Secondary, Arbiter) deployment and thous only have two databearing nodes. In case of a databearing node going down, read concern majority prevented the change stream to ...
Franz Huebner's user avatar