Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

All versions of MongoDB - a scalable, high-performance, open source, document-oriented database.

1
vote
0answers
6 views

Auth failing when using Devart ODBC connector to mLab

I'm trying to connect PowerBI to a mLab-hosted Mongodb instance. I first tried installing the MongoDB BI-connector, but after installing it didn't show up on the drivers list in Windows ODBC manager (...
1
vote
0answers
19 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 ...
0
votes
1answer
14 views

Connection error while installing mongodb on fedora 28

I have been trying to install Mongodb but it keeps failing midway. When the download is complete, installation fails with a connection error: MongoDB shell version v3.6.3 connecting to: mongodb://127....
0
votes
0answers
18 views

Create a MongoDB views from SQL Server tables?

Currently, I'm working on a project that involves three databases; two of which are SQL Server DBs and the third being a MongoDB (which we'll call A, B, & C). A is the master database, B is used ...
1
vote
1answer
35 views

Get the size of list of documents in mongo db

I want to get the size of the list of documents in mongodb. db.getCollection('eventDetails').find({"dateTime" : { $gte : new ISODate("2018-05-01T12:00:00Z") },"dateTime" : { $lte : new ISODate("2018-...
-1
votes
0answers
11 views

mongoDB - field to config YAML config file [closed]

im trying to to add authorization to mongoDB instance on AWS ec2, when adding to the config file security: authorization: enabled i'm reciving the following after trying to restart mongod: Failed ...
0
votes
0answers
37 views

How to connect to remote MongoDB server?

I am trying to connect remote mongoDB server but getting below error: pymongo.errors.ServerSelectionTimeoutError: 172.16.1.70:27017: timed out. The error is on line print(coll.count()) The Code ...
1
vote
0answers
25 views

Got signal: 11 (Segmentation fault) Mongo DB v4.0.0 [closed]

I am using an AWS t2.micro instance (1cpu, 1gb ram) and Ubuntu 16.04 x86_64. I am getting a FATAL error Got signal: 11 (Segmentation fault). This seems to match a bug reportedly fixed in version 3.6 (...
1
vote
1answer
25 views

How to permanently enable Read Access for MongoDB Secondary Node?

Upon trying to connect mongodb secondary node from application : 08:11:2018 16:01:00.552 - error: A hook (orm) failed to load! 08:11:2018 16:01:00.558 - error: Error: Failed to connect to MongoDB. ...
1
vote
2answers
30 views

Mongodb Products schema with proper indexes

I'm totally new to mongodb with a MYSQL background. I'm working on an e-commerce website with some millions of products So we decided to migrate from MYSQL to mongodb. So far this is the products ...
1
vote
1answer
36 views

How many files are created by default using WiredTiger storage engine?

So, I got a question on a test (without answer unfortunately) that left me with a big doubt whether it's true or false. The question is this: "By default, WiredTiger storage engine creates one file ...
1
vote
1answer
27 views

Is it possible to restore mongodb after db.dropDatabase() by replacing the contents of folder /data/db with older backup?

In order to reset replication, I did drop the local mongo database using the following commands: use local; db.dropDatabase(); The mongo data directory(dbPath) is /data/db/ I took a backup of this ...
0
votes
0answers
24 views

MongoDB Design - related tags

Given a tag, I want to know which are the most frequently used tags associated with that tag. The database has to be filled with an arrays of tags. The arrays of tags have average 20 elements. The ...
1
vote
1answer
26 views

How to correct Failed global > initialization: FileNotOpen

I am trying to run eos and using the std docs - https://developers.eos.io/eosio-nodeos/docs/build-validation I am trying - ~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf and I get the ...
0
votes
0answers
16 views

How to get distinct documents of user messages to different users?

In MongoDB we have distinct method that returns distinct values of a record from a specific collection: db.inbox.find({"inbox_type": "direct"}).distinct("sender") The above command returns distinct ...
0
votes
0answers
33 views

Force remove a dead shard from mongodb

I have a cluster with 3 shards, and one of them died. There is no backup of the shard and I can live without the data. I'm trying to remove the shard from the cluster and restart with the 2 remaining ...
0
votes
0answers
15 views

Mongo DB databackup configuration

We are using Mongo DB on RHEL server and Mongo db has its own backup strategy where in it backs up the data once it has crossed a certain limit But we saw the directory using something /home/data But ...
0
votes
1answer
25 views

what if mongos server goes down in shard cluster setup

I have followed the tuturial Deploy a Sharded Cluster I have setup config server replica set with 3 members (cfg1, cfg2, cfg3) [replica set name = configserverreplica] mongodb server replica set ...
0
votes
0answers
4 views

MongoDB auto fail-over not working

I have three mongoD instances running in a replica set in windows. MD1 -> Primary, MD2-> Secondry, MD3-> Secondry settings.electionTimeoutMillis = 10 seconds. If I bring my primary MongoD instance ...
0
votes
1answer
18 views

How to query the mongoDB admin database?

I'm trying to execute the below commands taken from the mongoDB docs use admin db.system.version.find( { _id: "authSchema" }) But running those in Robo 3t gives the following output switched to db ...
-1
votes
1answer
28 views

Easiest Way to Migrate data from MySQL to MongoDB [closed]

My latest IT project has me working with MongoDB for the first time. While I have a bit (very little) experience with NoSQL, I have always mostly worked with MySQL using Workbench. I need to migrate ...
0
votes
1answer
19 views

sh.status() error processing query: ns=config.mongosTree

if I run sh.status in mongos I get the error: assert: command failed: { "ok" : 0, "errmsg" : "error processing query: ns=config.mongosTree: ping $gt new Date(1532712420740)\nSort: {}\...
1
vote
1answer
86 views

MongoDB sharding by monotonic id with zones for archiving

Situation: I have an ever-growing collection of documents which do have monotonically increasing unique id. All queries are direct lookup for documents with specified _id (no range queries nor ...
0
votes
1answer
14 views

Mongodb cluster issue

I would like to put in place a cluster with 2 instances of Graylog. Ideally, one of them will receive logs from servers in the cloud and the other one on premise will receive logs from servers that ...
0
votes
0answers
28 views

Poor MongoDB performance when machine resource are available

MongoDB 3.6 using wiredTiger. We have the following set: 1 - MongoDB running in docker as primary-server at GCP (16GB ram, usually 9GB used) 2 - MongoDB running in docker as secondary-server at ...
1
vote
0answers
47 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
0answers
17 views

Issue in accessing the mongodb data in Tableau

I am using the mongosqld to view the mongodb data in Tableau mongodb Bi COnnector 2.5 is used Mongo Document Schema for Events Collection: "_id" : ObjectId("57f824abe3301b1984sdsds"), "information" ...
0
votes
0answers
32 views

Restore data with Ops Manager

I'm currently using MongoDB, version and Ops manager is latest version with RHEL 7 OS. As per my understanding, Ops manager takes base snapshot every 24 hours or based on our schedule which can be 6, ...
0
votes
0answers
19 views

Not able to login to Aliyun MongoDB instance thru Data Management Service (DMS)

I have created a MongoDB instance at Aliyun and have added a public IP connection. I can login using the MongoDB shell, but not thru the Aliyun DMS. Please help you know how to use Aliyun DMS.
1
vote
1answer
20 views

MongoDB Shard distribution issue

I am facing an issue in the shard distribution. MongoDB Version: 3.0.15 I have a collection that is sharded. I have two shards. Output of db.getCollection('event').stats() { "sharded" : true, "...
1
vote
0answers
22 views

ok design for mongodb - daily data?

So I don't have experience with Mongodb besides a few tutorials. Currently a website is set up using Mongodb for user access and for some other data. Because of this, I'd like to stick with Mongodb ...
2
votes
1answer
26 views

MongoDB Embeded Index

we have a collection in below format: { "_id" : { "a" : 8, "b" : ObjectId("5b23aa9e24826b82a2553ce7") }, "field1" : "value1", "field2" : "value2", "field3" : "...
1
vote
1answer
35 views

MongoDB Using String-Type Shard Key for Zone Ranges

Mongo lets any field type be used to set ranges for Shard Zones, but doesn't specify how analyses are conducted. My goal is to point queries and writes at the exact right server, WITHOUT using a ...
1
vote
0answers
31 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
39 views

MongoDB: db.collection.watch on sharded clusters

I'm interested in db.collection.watch feature on MongoDB sharded clusters. Did you have any problems with it in the production environment? To guarantee total ordering of changes, for each change ...
0
votes
1answer
31 views

Transfer Data between MySQL and MongoDB Databases [closed]

My latest IT project has me working with MongoDB for the first time. While I have a bit (very little) experience with NoSQL, I have always mostly worked with MySQL using Workbench. I need to migrate ...
0
votes
1answer
24 views

Ops Manager clarification

I am quite new to MongoDB ops manager backup process I have understood basic ops Manager setup from the document https://docs.opsmanager.mongodb.com/v4.0/tutorial/install-basic-deployment/ My doubt ...
0
votes
1answer
14 views

MongoDb use indexes partially

Can mongodb take advantage of an index partially? I'm not talking about using a "partial index" ( https://docs.mongodb.com/manual/core/index-partial/ ), but using a regular index partially. For ...
0
votes
0answers
9 views

Array as input for query in MongoDB (node.js)

I am stuck for 2 days with this issue. Any help will be much appreciated. I've got the following array of objects (more than 500 objects): var rentals = [{ deviceId: 1, start_date: ISODate("...
0
votes
1answer
24 views

Write concern in mongodb

All, Lets say devoper sets the write concern as Majority in MongoDB As a DBA can i have the access to change the write concern of whole cluster or only the developers has the rights to do through ...
2
votes
1answer
37 views

MongoDB Connectivity Issue

From last few days, I am facing connectivity issues with MongoDB Replica Sets deployed in google cloud. Interesting fact is these issues are appeared at Development machines and not on the production. ...
0
votes
0answers
39 views

MongoDB - Azure Cosmos DB replication?

What would be the easiest way to replicate an on premises MongoDB to an Azure Cosmos DB? The ideal scenario for me should be a transactional replication.
0
votes
1answer
175 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
2answers
32 views

MongoDB show duplicate key is null?

MongoDB version 3.6 I got the duplicate key message when I executed this. What's the actual problem? mongos> db.setup.findAndModify({ ... query : {"_id" : ObjectId("5b3c7abbea95705803084cad")}, .....
1
vote
1answer
16 views

MongoDB delayed member replication mechanism

We are considering implementing a delayed member in our MongoDB replicaset to protect us from human error based data corruption, e.g. someone accidentally deletes some data. How does a delayed ...
1
vote
1answer
21 views

MongoDB as a log storage. Choosing shard key

I'm designing a log storage system based on MongoDB. I want to shard a log collection to increase ingestion and capacity (distribute writes to several machines) while allow fast search. I should be ...
0
votes
1answer
28 views

How does Pymongo connection work?

I created a small speed test from misc.Database import Database import time db = Database.getDb() def main(): test_db = db.test_db.find({}) return "done" if __name__ == '__main__': ...
0
votes
0answers
16 views

Partially rotating MongoDB collection efficiency

I have a MongoDB collection with approximately 20M objects in it. Nightly, I am deleting (2 + incomplete portion) months of data and replacing them with an import from CSV that uses PyMongo 3.0....
1
vote
1answer
78 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 ...
0
votes
1answer
43 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 ...