Questions tagged [mongodb-3.4]

This tag is for MongoDB major version 3.4

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

How to show specific type record first in mongodb?

I want to show result in specific order. I have two categories on request instant and want to show instant record first. Here is my data: { "_id" : ObjectId("...
0
votes
0answers
3 views

Ops Manager Upgrade to 4.2

We have planned to upgrade our Ops Mgr from 3.6 to 4.2 Need to know what are all the configuration parameters and other prerequisite I should be aware of?? Should there be any change on the agents ? ...
0
votes
0answers
11 views

Mongodb Reads & Writes for a specific time period

Need to know if there is any possible way to find the total no. of reads and writes happening to my mongodb environment. We are using Mongodb 3.4 version in a sharded environment and need to find the ...
0
votes
0answers
59 views

how to run db.adminCommand() using pymongo for mongodb 3.6

I want to run this command and get it's output using pymongo module. db.adminCommand({getParameter: 1, logLevel: 1}) or say I want to run this command db.adminCommand( { setParameter: 1, ...
0
votes
0answers
5 views

How to find the no. of hits to a mongodb collection?

I need to find the no. of hits happening to the collections of a mongodb database. Is mongostats the only option? if so it gives only the real time output. Is there a way to find the hits of a mongodb ...
0
votes
1answer
13 views

how to setup mongodb replica on cloud server?

I want to setup mongodb repicaset on my cloud server(AWS ec2) but I have only one IP address. Currently I have make /etc/hosts two entries 127.0.0.1 dbnode1 and xx.xx.xx.xx dbnode2 but when I try to ...
0
votes
0answers
111 views

MongoDB - Update all documents NOT returned in aggregate query

I'm using PyMongo to write a Mongo update script. I have an aggregate query which returns a sum of all searches performed by each user in the last 30 days: cursor = mongo_search_logs_collection....
0
votes
0answers
27 views

Mongodb Automation Agent is not logging in Log file on the server

Our mongodb automation agent is running fine, but it is not logging the logs in the log file on the server. When we check the logs on the ops manager we are able to view it, but on the server its not ...
0
votes
0answers
27 views

MongoDB works only on user is assigned to admin database

I am using mongo db with authentication and it is working as expected when I map the user to the admin database like below, use admin; db.getUsers(); { "_id" : "admin.test1", ...
0
votes
1answer
146 views

How to use mongoexport command with ssl?

I am trying to export collection data from (SSL MongoDB 4.x), for this I am running below command on linux terminal. Earlier I used mongoexport command in Linux terminal without SSL which works ...
0
votes
1answer
221 views

Mongo E11000 duplicate key error collection after mongo 3.4 to 3.6 upgrade

I have a Mongo replica set on Ubuntu with three members configured for my information system and am having issues when I try to upgrade MongoDB from version 3.4 to 3.6 After setting the "...
0
votes
1answer
29 views

502 error after restarting mongo db in remote server using fork command

I was trying to upgrade mongo 3.4.20 to 4.0.14 , but it lead to the system crash, so i tried reverting it back to 3.4.20. But after doing db restart using fork , there 502 error. Please help.I tried ...
2
votes
1answer
64 views

Is it possible to migrate data from a shard MongoDB to a non-shard MongoDB with dump

Question: I have a shard mongo cluster and I want to migrate data from this cluster to a one node mongo instance. So I want to know is it possible to use dump/restore? I use pymongo and Django ...
0
votes
0answers
11 views

Decision on the shard key in MongoDB 3.4

I have _id column in the following format "date-machineNumber-eventgroup eventid-date-Timestamp-0" Can this key be used as shard key? shard key: { "_id" : 1 } unique: false ...
0
votes
1answer
34 views

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene?

Why is it necessary to run both mongod and mongo.exe in windows? What's happening behind the scene? What's the difference between these two?
0
votes
0answers
54 views

Issue in projecting field using findOneAndUpdate in embedded array Mongoose?

Currently my User model looks like: { _id: 'SomeId' firstName: 'John', lastName: 'Cena', books: [ { _id: 'xyz', title: 'a', author:'b', ratings:[ {source:'source1', ...
1
vote
0answers
80 views

Does restarting Mongodb config servers restart the mongos?

Our environment is a 2 node Shard of 5 node replica set with a 3 node replica set config servers and 6 mongos. We happened to change the hostname(short to FQDN) of 1 of the config server and we ...
1
vote
0answers
248 views

MongoDB Fails due to permission error even though its setup

Attempting to start my MongoDB server using service mongod start fails for the reason: exception in initAndListen: IllegalOperation: Attempted to create a lock file on a read-only directory: /var/lib/...
0
votes
1answer
320 views

Mongo DB content disappear

I have a rails app deployed elsewhere that accesses a Mongo DB running on my local box (at my home). The remote box ip address is the only external address allowed to access the DB. Two nights ago I ...
2
votes
1answer
3k views

Why $group is very slow in aggregation and how can faster it in MongoDB [closed]

My query is taking ~3 seconds to execute with the $group stage, How can I faster this? My query is: db.getCollection('employee_data').aggregate([ { $match: //Filter }, { $group: { ...
1
vote
2answers
204 views

How to influence files (pre)allocation steps (max growing value) in MongoDB 3.4 with WiredTiger

We have in environment deployed some really small DBs (5GB) as directory per DB.Under dirs is LVM with XFS, where we have implemented logic for "brake" when DB space should be full-filled (all is due ...
0
votes
0answers
483 views

MongoDB 3.4.10 queries getting very slow after couple hours/days of running

We have a MongoDB pod running on CGP Kubernates with 2 replicas. Microservices are written in Java and use Mophia to access MongoDB. The database only has 6 million data. One collection, in particular,...
0
votes
0answers
867 views

MongoDB Indexes [getting deleted automatically] | Missing

This problem might look strange. Please bear with me :) It's an application(NodeJS - MongoDB) helping with storing and viewing of LoRa Packets. Background: It's a CentOS 7 on Azure Instance. ...
0
votes
1answer
48 views

Mongodb creating historical cluster replicaset

I've a use case which I'm trying to implement.. There is a replicaset(3 nodes) which is primary production cluster, I want to set up a historical cluster another replicaset(3 nodes) which replicates ...
2
votes
3answers
3k views

MongoDB - Mongorestore is not working as expected

A Very Good Day, I have the user in the mongodb like below who has the superuser privileges (I confirmed the role setting using show users command) { "_id" : "admin.mongoadmin", "user" : "...
1
vote
0answers
144 views

MongoDB ticket availability reaching zero

I recently came across intresting issue. I have a sharded cluster which has two replication sets with 2 secondaries. On my primaries, there were 300-400 connections at a point in time, shortly after ...
0
votes
0answers
41 views

Mongo Collection Mysteriously unavailable

We are running a mongo on single EC2 instance, we were not able to connect to it , upon debugging we saw CPU usage was spiking , this was the problem we faced previously we then restarted the instance ...
1
vote
0answers
57 views

One of the mongo shards consuming too much disk space.

We have mongo cluster with 10 shards of each having 3 replicas. Recently we are facing an issue, exceptionally in a couple of shards, the disk space among all the 3 replicas has reached above 90%. ...
3
votes
1answer
291 views

Mongo WriteConflictException in log file

I am experiencing ALOT of this WriteConflictException in my mongo log file, this does not seem to affect the application, because I am not seeing any special errors and everything seems to work fine. ...
2
votes
1answer
112 views

Getting exception on running sh.status() command on MongoDB sharded cluster

I am running sh.status() command on my mongos instance of sharded Mongo cluster and I am getting below exception. mongos> sh.status() assert: command failed: { "ok" : 0, "errmsg" : "error ...
1
vote
1answer
255 views

Mongodb ReplicaSet Changing Config Format

I have a 3 node mongodb replica set which uses the old syntax (non-Yaml) syntax that I am trying to change to use the new Yaml syntax old syntax auth = true bind_ip = 0.0.0.0 dbpath = /var/lib/...
2
votes
1answer
4k views

Not authorized on admin to execute command mongoDB: Atlas M0 Free Tier cluster

My MongoDB shell has version v3.6.5 (the same with older versions) & MongoDB server has version: 3.6.8 I have MongoDB M0 Free Tier cluster and I want to use from shell different commands. So, I ...
1
vote
0answers
176 views

timeout while dropping database - MongoDB

Getting time out issue while dropping database from mongoDB. Database size is around 200GB. {          "code" : 46,          "ok" : 0,          "errmsg" : "timed out waiting for DBNAME....
1
vote
1answer
5k views

MongoDB update multiple sub documents inside array, each according to a condition

I have a document like this: { wid: 1, items: [ {nid: 1, sent: 900}, {nid: 2, sent: 12}, {nid: 3, sent: 0}, {nid: 4, sent: 1} ] } Now consider I want to ...
0
votes
1answer
1k views

mongodb setFeatureCompatibilityVersion command not found

I'm trying to upgrade my mongodb from 3.2 to 3.4 and I try to set the compatibility version by: db.adminCommand( { setFeatureCompatibilityVersion: "3.2" } ) But it says { "ok" : 0, ...
0
votes
1answer
216 views

MongoDB secondaries become unresponsive during replication

We got 3 Servers running. One Primary, two as secondaries. Primary has 4 vcpus, 16 GB memory, both secondaries have 8 vcpus, 64 GB memory. Every night, we run a full sync with several large ...
1
vote
1answer
31 views

Why MongoDB not running SSL?

I need to run MongoDB with SSL, the version that is currently installed is 3.4.16 without SSL. Can I download 3.4.16 with SSL and just stop the service copy the Bin files across and then start up the ...
1
vote
0answers
273 views

MongoDB write locks on insert

Why would an insert into a MongoDB 3.4 collection require global write locks? I'm creating a copy of a large collection in a new replica set (via mongodump/restore) and I'm finding that some inserts ...
1
vote
0answers
167 views

MongoDb cleanupOrphaned() running for days

My cleanup orphans on a collection is running for 3 days now. Log shows a few million records being deleted once in a while. However, most of the time nothing is deleted. I SHARDING [conn3919] ...
1
vote
0answers
30 views

MongoDB 3.4 - Add nodes to Replica Set when only one is available

I originally had a Replica Set comprised of three nodes on different servers. As part of a contingency plan, I tested how long it would take to hot-swap from using a replica set to only using one node,...
0
votes
1answer
817 views

Authentication failed on secondary mongodb

I have primary mongodb v3.4.10 on ubuntu (bare metal) with these users: { "_id" : "admin.root", "user" : "root", "db" : "admin", "roles" : [ { "role" : "root", ...
2
votes
1answer
3k views

mongodump 3.4.1 error reading collection: Closed explicitly [closed]

[BACKUP COMMAND]: mongodump -u username -p password -d database --port port -o output path. [ISSUE]: error writing data for collection to disk: error reading collection: Closed explicitly. The ...
2
votes
2answers
3k views

MongoDB multiple Cluster data sync

Can we have this type of configuration? 1)MongoDB - Multiple cluster data synchronizing master to master 2)MongoDB - Multiple cluster DR 3)MongoDB - Multiple cluster Blue-green deployment
0
votes
1answer
2k views

mongodb set feature compatibility to 3.4 fail

I want to enable the features of my Mongodb 3.4 after upgrading. I have sharded cluster enviroment And after I ran the commands: use admin db.adminCommand ({setFeatureCompatibilityVersion: "3.4"}) ...
1
vote
2answers
452 views

How to change default mongo port on a bitnami instance

I am running a bitnami instance of mongodb for our pre-production. The default port for mongo is 27017. But for security reasons i want to change it but it is not possible. I have tried these things: ...
1
vote
2answers
3k views

Mongodb Standalone Performs better than Replica Set

I am currently using a standalone mongodb with high read operations. Since replica sets could provide high read performance, I setup a 3 node replica set on 3 vms with read preference as "secondary ...
0
votes
2answers
1k views

How to find a query that is use deprecated option?

Mongodb writes logs 2018-04-05T11:38:28.178+0000 W COMMAND [conn107] Use of the aggregate command without the 'cursor' option is deprecated. See http://dochub.mongodb.org/core/aggregate-...
1
vote
1answer
421 views

how to interact to second database through API on mongodb

I am on Windows environment. I am using Mongoose and nodejs for my project. I have MongoDB Replication i.e 27017(primary), 27018(slave)and 27020 is (Arbitar). now I have One more seperate db named as ...
0
votes
1answer
26 views

Embedding JSON in a string

Wondering if I could get some insight on a design I saw recently. A collection can contain a few or tens of thousands of documents. Each document has the same structure of _id and JSONValue. The ...
0
votes
2answers
5k views

How to install specific mongo version from the PPA?

Once you've setup the offical mongo PPA, Mongo's docs say that to install a specific version on Ubuntu, to run something like: sudo apt-get install -y mongodb-org=3.6.2 I'd like to install version 3....