Questions tagged [mongodb-3.6]

The tag has no usage guidance.

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

Faster export option for noSQLBooster ( Mongodb )

I know about mongoexport being fast. The problem is our service is a cloud server, so I can't connect on it to run mongoexport.exe. I'm using the GUI noSQLBooster and I can easily right click . ...
0
votes
2answers
41 views

MongoDB Replica Set InitialSyncOplogSourceMissing error

I am setting up a 3 nodes MongoDB replica set with one node in AWS using Mongo 3.6.12. There are about 400GB data need to sync to secondary nodes. Initial sync starts fine. However, after data sync ...
0
votes
0answers
20 views

MONGODB -> Whats the best DB model for friendship user Relationship

Good morning: I want to implement friendship between two users, that friendship is defined by a status (accepted, pending, blocked). It only occurs to me to use a collection as follows: USER1 - USER2 ...
0
votes
1answer
20 views

Converting MongoDB instance from Standalone to Replica Set and Backing Up

I want to convert my MongoDB 3.6 standalone server to a replica set so I can watch a collection using change streams, which requires an oplog. I only want to use change streams so will keep this as a ...
0
votes
1answer
100 views

mongodb - Replica set creation error: Quorum check failed because not enough voting nodes responded

I am configuring a mongodb replica set. From my current primary node, when rs.add('host1:27017'), it yields this error Quorum check failed because not enough voting nodes responded; required 2 but ...
0
votes
0answers
10 views

How to add calculated value as a field into an existed array of sub document using MongodB aggregation

I'm working on MongoDB and I have a document like below structure. I am trying to calculate total services cost and each services lane cost. Here services are sub document. My document structure: { ...
0
votes
0answers
40 views

How to delete a user in MongoDB 3.6

I was in trouble with deleting the users in mongodb3.6. I created a user with: db.createUser({ user: "username" , pwd: "password", roles: ["root"]}) And I deleted it with: db.dropUser("username") ...
0
votes
1answer
44 views

Slow performance of query with $and & $or operators

My query with $and, $or operators is performing poorly. Even though I've built a compound index on all three fields that are specified in my query criteria, the query does a complete collection scan. ...
0
votes
1answer
32 views

Why a query is not covered when using a range operator on documents?

I have created the following 1000 documents: for(i=0;i<1000;i++){db.doc.insert({"doc":{"k1":"v_"+i,"k2":i},"scal":i})} So a document looks like this: var d1 = db.doc.findOne() { "_id" : ...
0
votes
1answer
14 views

Mongo Memory management

I had a few questions If there is sufficient RAM, does Mongo load entire collection into memory? Suppose I had two collections A & B and I know that there is not enough RAM to hold both - and if ...
0
votes
1answer
24 views

Is it possible to retrieve a history of the remote connections to the MongoDB including the IP addresses and the executed commands?

For some reasons I disabled the user access control and somehow all collections have been wiped out. So I want an activity log to find out how this happened I need a list like this: | Date/Time ...
1
vote
1answer
100 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
1answer
47 views

Import indexes from MongoDB v2.4 to MonDB v3.6.4

I have migrated the collection.bson file from MongoDB 2.4 to MongoDB 3.6.4 as collection.json. But their is 1 more file collection.metadata.json in MongoDB 2.4. How can I import this to MongoDB 3....
1
vote
2answers
333 views

MongoDB CSV Export: One Array/Column & Array Index on rows, or vice versa

I have a MongoDB schema that looks like this: const batchSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, time: {type: [Number]}, tmp: {type: [Number]}, hum: {type: [Number]}, ...
0
votes
0answers
6 views

mongodb autinticationDatabase issue

I have already authenticationDatabase enabled on my MongoDB. Now I want to disable the authenticationDatabase for my MongoDB. I have removed the --auth from the mongod.system file. After restart the ...
0
votes
1answer
512 views

MongoDB, Getting Started and Connecting with Compass

I'm trying to connect to my mongoDB running as a service on my rPi3B+, using openSuse Tumbleweed 64bit, mongo version 3.6.2, from my laptop sharing the same LAN/Wifi (pi on LAN & laptop on Wifi). ...
0
votes
1answer
35 views

I am trying to achieve a Disaster recovery for Mongo DB

Right now i have a MongoDb HA in site one and i need another site with asynchronous replication enables in another location.This is a base plan of mine to achieve a disaster recovery . I dont have ...
0
votes
1answer
356 views

MongoDB 3.6 crashed due to invariant() failure

MongoDB crashed twice in 6 hours today due to invariant() failure. We have been using MongoDB 3.6.3 for more than a year now, but this is the first time that we saw this issue. The extract from the ...
1
vote
1answer
352 views

MongoDB does not allow to create unique partial index in field that contains null

I'm using MongoDB 3.6.9 (with Ubuntu) to save a set of documents that contain one field named rss_id and for some documents, this field has the value null. I want to create a unique index in that ...
1
vote
1answer
62 views

No output when use pymongo watch()

I try to access real-time data changes with pymongo.mongo_client.MongoClient.watch(), code example (Python 3.5.3, pymongo==3.7.2): from pymongo import MongoClient DB_CON_STR = "mongodb://10.10.10....
0
votes
1answer
90 views

MongoDB 3.6, adding replica set always fails as on production setup with cannot open /dev/urandom Too many open files

I am trying on add a 3.6 mongoDB node to a 3 member replica set running 3.4. Doing this as a part of DB upgrade from 3.4 to 3.6. When I add the new member to replica set, it goes to STARTUP2, data ...
0
votes
1answer
152 views

Why am I seeing these mongodb 3.6.5 server log messages in huge amounts?

Could someone please shed some light on these mongodb 3.6.5 server log messages on the primary node of a 3-member replicaset? rs.status() says all the nodes are up and running but seeing a ton of (I)...
0
votes
1answer
51 views

mongodb array query woes

I am struggling with array matching and getting multiple records back. "players" : [ { "pname" : "player_4", "loc" : [ -2.2, 1, 0] }, { "pname" : "player_2", ...
1
vote
2answers
74 views

Is it possible to run an arbiter on a machine that also hosts a secondary member?

I have two machines (it is a restriction) configured as a replica set with MongoDB 3.6.5. Is it possible to run an arbiter on a machine that also hosts a secondary member? Even if it is not ...
0
votes
1answer
55 views

Replica Set Oplog Maxsize

I have two databases (Mongodb 3.6.5) using ReplicaSet, when I made a split in the network, I am forcing the secondary database to be the primary. cfg = rs.conf() cfg.members[0].votes = 0 cfg.members[...
0
votes
1answer
82 views

How to solve replication in MongoDB only with two machines?

I have two machines connected in a ring network, each one running Wildfly in HA mode using JGroups ant MongoDB in HA Mode using Replica Set. The machine 1 is the primary and machine 2 is secondary. ...
0
votes
1answer
907 views

mongodb - what roles the user to grant access to all databases

I have created mongouser as testuser with below roles. I want to give access for new databases for this user. what roles the user to grant access to all databases. db.createUser({ user: "testuser" , ...
3
votes
1answer
340 views

MongoDB Facet Error pipeline requires text score metadata, but there is no text score available

I created a mongodb faceted pipeline that the following is a subset of: db.books.aggregate( [ { $facet: { "categories": [ { $match: { $text:...
1
vote
0answers
37 views

Changing collection path and index path in mongod.conf file

I want to have collection path and index path in different folders of my mongodb. What are the required changes? My current configuration file is this: storage: dbPath: /db/mongodb journal: ...
2
votes
1answer
1k 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
107 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....
2
votes
0answers
247 views

getIndexes returns empty array on MongoDB collection

I'm trying creating indexes on a MongoDB collection and while they are correctly created and they work (I can see the index in the executionStats), the output of the getIndexes() function is an empty ...
0
votes
1answer
400 views

Query sharded collection returns all the results from the primary shard AND from the other shards

I tried to set up a shard to test this functionality and maybe migrate some of our data into it. I followed the documentation guide https://docs.mongodb.com/v3.4/tutorial/convert-replica-set-to-...
0
votes
1answer
70 views

dokku-mongo Export Database Error

dokku-mongo export Database command is showing error "This does not look like a tar archive" $ ssh svuser@dbexample.com $ dokku mongo:export database > backup.tar $ tar -xfv backup.tar tar: This ...
0
votes
1answer
107 views

unable to add a range to a tag using sh.addTagRange command

Have setup a 4 node test shard cluster: 1- mongos 1- config server 2- shard nodes hosting 1 shard each for a collection. Cluster is working perfectly, but when trying to run the following command: ...
0
votes
1answer
232 views

Mongo doesn't restore user password

I have following scenario: Dump Mongo database (cmd mongodump) Change password from one of admin users Restore Mongo database (cmd mongorestore) EDIT: I use following command for db dump: ...
1
vote
0answers
24 views

How to do a find query on the result of another find query?

I'm working with MongoDB because the company where I work is doing a migration from pSQL. We have reports with filters: first the report lets you select a range of dates by year and month, then you ...
1
vote
0answers
188 views

It is possible to take incremental backup in mongoDB Shard cluster? without opsmanager

Shard MongoDB Cluster: 3-router 3-config 2-shard (3-replica's per shard) We are tring to take incremental backup for every one hour. We gone through few google links, but no luck. As per our above ...
0
votes
3answers
8k views

mongodb: update string field to integer

I have a collection that has some fields that should be integers. Due to a software bug, some of these values are strings. I need to convert them. Here is an example document: var coll = db....
1
vote
1answer
4k views

node is not in primary or recovering state

My config file is: systemLog: destination: file logAppend: true path: c:\data\log\mongod.log storage: dbPath: c:\data\db journal: enabled: true replication: replSetName:...
1
vote
1answer
274 views

How to avoid warning with file system cache in mongodb?

OS Windows 10 x64. Version of MongoDB 3.6.5 When I'm starting mongo process, I'm always getting: MongoDB shell version v3.6.5 connecting to: mongodb://127.0.0.1:27017/ MongoDB server version: 3.6.5 ...
1
vote
1answer
312 views

Mongodump Backup Resume

My database size is approx 1.5 TB and I have approx 2TB free on backup mount point. But after 10 hours my backup fail due to lack of storage and its just 60% complete. Is their any why through which i ...
0
votes
1answer
292 views

How to connect via config file in mongodb

In config file I have: systemLog: destination: file logAppend: true path: c:\data\log\mongod.log storage: dbPath: c:\data\db journal: ...
3
votes
1answer
605 views

MongoDB crashes with out-of-memory or is being killed by oom-killer

A two shards MongoDB database regularly crashes with out-of-memory error or is being killed by the oom-killer. The system runs on GCE Debian 9.4 with MongoDB v3.6.5, WiredTiger storage engine and ...
1
vote
0answers
15 views

How can I dump the data which has been added recently?

On a daily basis I will download the data from mongodb and make a backup. I use the command mongodump -h $MONGODB_SERVICE_HOST -o /opp/rot/llc/ttc -u 'admin' \ -p $MONGODB_ADMIN_PASSWORD So in ...
0
votes
1answer
84 views

Unable to perform queries through mongos

I have setup a minimal replicated configuration with mongodb 3.6.3,it seems to be everything fine but when I connect to the mongos (which as far as I understand acts like a kind of load balancer in ...
2
votes
0answers
802 views

MongoDB GridFS triples the file sizes

I really like using mongodb to store my data and recently I tried out GridFS and it really fits my use case. My problem with it is the space requirement, which seems quite odd. I have ~107GB of ...
1
vote
2answers
96 views

Should I put users in admin DB or in the DB that they should have access to

What would the pros / cons be of putting users that should have access to one database in the admin database instead of the database that they should have access to? Background: I'm a C# developer. ...
2
votes
1answer
982 views

High CPU Utilization for Mongodb ReplicaSet Secondary Nodes

I am using MongoDB server version: 3.6.4 (WiredTiger storage engine) with 3 node replica set on AWS r4 large machines. Sharing the CPU Utilization graph of all the nodes Primary (with .33%) ...
2
votes
1answer
2k views

How to configure SSL mongodb connection in yml file spring boot? [closed]

I was trying to setup ssl mongodb connection from spring boot but I couldn't able to find a way. How can I add pem and ca file to below connection? Please note I am using replica set data: ...