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

Questions tagged [mongodb-3.6]

The tag has no usage guidance.

0
votes
1answer
24 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
26 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
44 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
51 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
22 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
42 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
30 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" , ...
-1
votes
0answers
42 views

MongoDB Connection String ReplicaSet Not Working

I have set up a MongoDB Replica Set and this is the structure: One primary node. One secondary node. One arbiter node. I have included the output of rs.status() at the end of this post. The problem ...
3
votes
1answer
69 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
22 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: ...
0
votes
1answer
263 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
36 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
0answers
65 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
129 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
41 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
50 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
52 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
22 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
0answers
52 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
86 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
2answers
2k 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....
0
votes
1answer
1k 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
147 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
150 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
156 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: ...
0
votes
0answers
54 views

restore using oplog.rs

server 1 : runs 3 member Mongodb replica set, sequence of tests is 1) mongodump the full instance with --oplog. on Server 2 : I create a single member replica set. Initiate it. Move the dump file to ...
2
votes
1answer
311 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
12 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
53 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 ...
0
votes
0answers
76 views

Mongodb: change of hostname of an shard cluster, RS trys to connect to old IP

We had to change hostname and IP address of our system. I changed all member hostnames of all replica sets (also config server replicaset) Now rs is not starting, config server is up an running but ...
2
votes
0answers
388 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
87 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
350 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%) ...
1
vote
1answer
1k 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: ...
2
votes
1answer
860 views

Mongodb create user with only read and write access

Hi I created a new using using following command in mongodb, db.createUser({ user: 'csquad', pwd: 'somepass123', roles: [ { role: "readWrite", db: "cloud"}]}); Now this user is able to login to db ...
0
votes
0answers
34 views

Mongodb database move high cpu usage

I've moved mongo 3.2 x86 database from windows server to linux server with mongo 3.6 64 bit after dumping mongo and restoring database in linux, with or without --noIndexRestore, cpu gets 100% in ...
0
votes
1answer
63 views

MongoDB Ops Manager

I have few questions regarding backup process in MongoDB Ops Manager 1) How backup process works ? 2) According to documentation for production do we need to have 3 dedicated servers for ...
1
vote
1answer
109 views

Mongo Zone Sharding Implementation Issue

As I am new with MongoDB. I have configured 2 config server, 2 shards and all are connected with mongod client. Also, One Mongos client is UP and Running. I am currenctly implementing Sharding ...
0
votes
1answer
185 views

Allow only find and insert action to mongodb collection

I want to create collection. that allow only insert and find operation. i read Privilege Actions in mongodb and i applied that method but all actions are performed like remove and update i tried ...
0
votes
0answers
1k views

How to accumulate aggregate group by nested object keys in MongoDB

I am looking for an aggregate pipeline in MongoDB which can achieve this requirement: I have a collection like: {"filter": { "_id": { "$gt": 10 } } }, {"filter": { "_id": {...
1
vote
1answer
262 views

MongoDB 3.6 create local Shard db without replica

This is what I want to do: Create a Config Server Create 2 Shard Create a Mongos Router I don't want to replicate my data using replica set, I want to simulate that each shard has only a part of ...
1
vote
1answer
80 views

Why findOne() hangs on a sharded collection?

A MongoDB v3.6.4 database with a large sharded collection and WiredTiger engine hangs when issuing a findOne() or find() command without any parameters. The collection has only the default index on ...
1
vote
0answers
33 views

Mongodb secondary going down

I have a problem with my secondary, which is constantly going down, in normal replica set (primary, secondary, arbiter). What I saw while investigating that there is one long lasting operation in ...
0
votes
1answer
198 views

How to reconfig config server connection setting from shard cluster?

I have a mongo cluster which includes one "mongos" one "config" (rscfg/a.a.a.a:27019) two "shard" Here is the situation, I added a new rs on config server and remove the old one rs.add("b.b.b....
0
votes
2answers
287 views

How to find all invalid document based on jsonSchema validator?

One of the new feature in MongoDB 3.6 is jsonSchema validator. I can create a collection with an validator like below: "validator" : { "$jsonSchema" : { "...
1
vote
1answer
617 views

Why does mongodb fail my json schema validation?

I am using mongodb 3.6 and have below validator for the students collection: rs1:PRIMARY> db.getCollectionInfos({name: 'students'}) [ { "name" : "students", "type" : "...
1
vote
1answer
153 views

How to properly use moveChunk when chunks of certain range needs to be moved?

A MongoDB 3.6.3 database has two shards and a mongodump file with partial data of one collection needs to be restored. The first shard is named "fast" while second "slow". The idea is to restore the ...
0
votes
2answers
439 views

How to speed up MongoDB chunk moving between shards

On a MongoDB 3.6 in a replica set and WiredTiger engine we have a large collection with 7.7TB of data. We started to see severe performance issues (extreme CPU usage and slowdown of data replication) ...
0
votes
0answers
34 views

Unable to find orders collection dataset for mongodb

I am working on mongodb examples. I was able to find some collection like restaurant. However, I was not able to find the orders collection that is reffered in this example https://docs.mongodb.com/...
0
votes
1answer
816 views

Binding specific ips with Mongodb

I am using Mongodb 3.6.3 on Centos 7. I am running the below command: sudo mongod --storageEngine wiredTiger --dbpath /data --bind_ip_all --logpath /var/log/mongodb/mongod.log --fork and ...