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]

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

0
votes
0answers
41 views

Can I allow non-TLS on localhost for MongoDB while requiring TLS for another IP?

The MongoDB net options don't seem to be very flexible. I want to be able to configure allowSSL for 127.0.0.1:27017 and requireSSL for some other interface, is this not possible with MongoDB?
1
vote
1answer
524 views

Allow MongoDB Read/Write But Disallow Delete Permission

I want a user to be able to read and update, but not able to delete in any collection for MongoDB. The command I used is: db.createUser( { user: "user", pwd: "user", privileges: [ ...
-1
votes
0answers
39 views

MongoDB error WT_SESSION.open_cursor: <path>\index-6-3433226623529221452.wt: file-size: GetFileAttributesEx:The system cannot find the file specified

Our 5 node (Pri,Sec,Sec,Sec,Arb) replicaset was having issue (2 secondary nodes not able to be brought up after server OS patch). The 2 secondaries were down for a few days. The OS issues are now ...
-1
votes
0answers
93 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 ...
0
votes
1answer
83 views

Mongo 3.2.20 Invalid access at address

My mongodb local instance just crashed on its own with the following in its log: Invalid access at address: 0x18 Got signal: 11 (Segmentation fault). Environment: Ubuntu 16.04 MongoDB v3.2....
2
votes
0answers
443 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
0answers
18 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
166 views

What happens exactly when a chunk gets migrated?

So, this is what MongoDB states: Independent of the secondaryThrottle setting, certain phases of the chunk migration have the following replication policy: MongoDB briefly pauses all ...
1
vote
1answer
28 views

How can I authenticate mongodb server identity via mongodb shell?

I am trying to deploy a mongodb instance in my environment. I have settled a ssl connection so it is possible to authenticate clients (using a certificate they enter and agreed root ca by both the ...
1
vote
1answer
937 views

MongoDB SSL peer certificate validation failed: unable to get issuer certificate

I have enabled SSL on MongoDB with optional SSL connection: preferred. I have used lets encrypt in order to obtain SSL certificates. SSLs works as expected and in mongod.log file I can see that: ...
0
votes
1answer
348 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", ...
0
votes
0answers
14 views

MongoDB doesn't move the last chunk in migration

I have this situation after a removeShard("br1") { "msg" : "draining ongoing", "state" : "ongoing", "remaining" : { "chunks" : NumberLong(1), ...
1
vote
0answers
543 views

Unable to restore indexes with mongorestore command in MongoDB

I am unable to restore indexes with mongorestore command while restoring the collection i am getting the collection but i am unable to restore the indexes with it so whats the solution to restore the ...
2
votes
1answer
280 views

sharding and replication on mongodb?

My question is on the answer given at Difference between Sharding And Replication on MongoDB I need to split thedata of 75GB into 3 shards of 25GB each with replication factor of 3. Answer depicts ...
1
vote
1answer
113 views

Can mongorestore replay oplog via mongos?

I'm using MongoDB 3.6.2 and configured to sharded cluster. I used mongodump to dump oplog from every shard and then restored by mongorestore via mongos, but I got below error. Failed: no oplog file ...
1
vote
0answers
79 views

Why would MongoDB resident memory suddenly drop?

We run Mongo 3.2.8 on Windows 2008. Since the start of this week the server MongoDB runs on has effectively run out of memory every morning. The server has 16gb of RAM. When we see this behaviour ...
1
vote
2answers
88 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. ...
0
votes
1answer
1k views

Is it possible to delete cache in Mongo?

My case is that I run several queries in Mongo and measure the response time. I know that Mongo uses Memory Mapped files and cache some data in RAM. If I create an index and run a query the execution ...
0
votes
1answer
591 views

Mongodb _id Value and Indexes Are Lost During Mongorestore

Steps I used: mongodump copy dump folder to another computer (for each collection I get .bson and metadata files) mongorestore myDumpFolder I noticed the indexes are lost and _id has new ...
0
votes
1answer
135 views

What's MongoDB's default behaviour when no sharded collection is specified

When we deploy a Sharded Cluster, without having a sharded collection in our database, what is the default behaviour of MongoDB? How does MongoDB, distributes the data across the shards?
0
votes
1answer
201 views

Mongodb Cross-region failover replication aws

I have deployed 3 MongoDB nodes(node-1, node-2, node-3) in AWS. The first two nodes (node-1, node-2) are deployed in Virginia region and the third node(node-3) is deployed in Oregon region and enabled ...
0
votes
1answer
757 views

Insert on duplicate key update using MongoDB

Can somebody tell me how I should build MongoDB "updateOne" query to get analog of the following SQL query: INSERT INTO `collection` (`hash`, `total`, `base_fare`) VALUES ('aaa', 200, 150) ON ...
0
votes
2answers
64 views

Mongodb chunksize issue

I have a collection which have size : 60 GB I want to shard this collection. Shard key is hash index and unique. I followed this document https://docs.mongodb.com/manual/reference/limits/#Sharding-...
2
votes
1answer
378 views

Merge 2 mongodb databases

Our team have hard time. Situation: API went down, all infrastructure (API + MongoDB) terminated. We restore API and mongodb (data restored from backup). After a while (let's say 1 day) we discovered ...
-1
votes
1answer
78 views

Unstructured point cloud data from MongoDB vs filesystem

NOTE: I am using geographic locations here in my question, but those who do image processing likely face similar questions/issues. That is why I've titled the question using unstructured point could ...
2
votes
1answer
409 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%) ...
0
votes
2answers
164 views

How to see last actions executed (and time) of a specific database in MongoDB?

There are multiple databases but some of them look stale. I need to understand if the database is stale or not. How can I get the last actions executed of a specific database in MongoDB? And can I ...
1
vote
1answer
45 views

create mongodb user to only read in replica set (not in master)

We have a Mongodb with ReplicaSet and a readonly user. This user can read from both Master and Replica Set. Some of the developers might accidentally run heavy queries from Master with this readonly ...
1
vote
2answers
141 views

How to measure throughput in MongoDB

I want to measure the throughput of read operations in Mongo. By throughput I mean "how many reads the system process in a given amount of time (every second)". I run mongotop 1 and I get: ...
2
votes
1answer
527 views

MongoDB - sharding an collection with data already in it

I'm using Mongo (shell version 2.6.12) in a clustered configuration. Right now I have a few collections sharded, and was looking to shard another collection. This collection already has data in it. ...
0
votes
1answer
87 views

Mongodb shard balancing failed

Data balancing fails on Mongo cluster with 1 mongos and 3 mongod instances. All the data for the collection fs.chunks stays in the same shard with the following error. Env: Ubuntu- AWS m3.large, ...
1
vote
1answer
95 views

MongoDB Zone Sharding without min & max key [closed]

I have a database structure that is similar to the following structure. User collection Sub collection0, with userId Sub collection1, with userId Sub collection2, with userId and so on Example: ...
1
vote
1answer
873 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 ...
0
votes
2answers
838 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
2
votes
1answer
381 views

MongoDB gives certificate not trusted while openSSL says keys is OK

I have used let's encrypt to generate SSL certification. All the private key, chain and certificate is generated by `let's encrypt. Now to use it in MongoDB I first merged privkey.pem and cert.pem ...
0
votes
2answers
435 views

MongoDB Replica Set Failover due to unreachable SECONDARY resulted in Rollback

I have a 3 member replica set with 1 primary, 1 secondary and 1 arbiter. Due to some apparent network issue, the secondary was unreachable. After some time, the secondary became the primary and caused ...
0
votes
1answer
98 views

Handling Bus Error in Mongo Service

I have a Mongo service with which multiple hosts are interacting. The host on which the Mongo service is running is quite special -- it has 3TB of RAM. However, that host also throws intermittent Bus ...
2
votes
1answer
2k views

Mongo Auth fail when using mongod.conf

Im trying to learn about mongo and how to secure it. I manage to make it work using command line but when I try to use a conf file I get erros on authentication. I have created an admin user like: ...
0
votes
0answers
86 views

How to restore a compose.io backup file in local

How to restore a compose.io backup file in local, i tried using mongorestore, but it doesn't work, i'm unable to generate a 'bson' file from that backup too. After extracting the zip file which is the ...
0
votes
1answer
63 views

ADD new node Replication in MongoDB

Here i found some trouble. and i don't known why! Now I have one replication with 3 members (1 of primary, 2 of secondary), And i want to add another one (secondary) to sync the data. the data has ...
0
votes
1answer
46 views

Setup standalone with all the data from cluster, mongodb [closed]

I have a mongo cluster with 3 nodes(a primary, a secondary, and an arbitrary) with replication enabled for primary and secondary. For some reason would like to take down the cluster and have a ...
-1
votes
0answers
272 views

MongoDB Aggregation - Creating new arrays from a given array

i wish to create new arrays from a given array based on my aggregation results, the desired outcome from the following doc is to split the array into new arrays where the split point is the action "...
2
votes
1answer
966 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 ...
2
votes
1answer
182 views

How to configure mongodb replica set with redundant networks

I need to set up a mongodb cluster with redundant private networks connecting all the nodes. Mongo's documentation states: ... you should place each mongod instance on a separate host server ...
0
votes
1answer
68 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 ...
0
votes
0answers
9 views

Mongodb: unable to create physical volume

While trying to implement backup for Mongodb, to create snapshot I need volume group and thus physical volume. I am creating physical volume using pvcreate /dev/sda1 and getting this error: Can't ...
0
votes
0answers
143 views

AutoReconnect: [Errno 32] Broken pipe

I was just wondering if anyone here can help me out in fixing this issue. I am having some trouble while configuring this browser (https://github.com/macarthur-lab/gnomad_browser) on my machine. Every ...
-1
votes
1answer
25 views

How to backup documents to s3 in a particular collection older than specific dates in a mongodb collection where timeseries data are stored? [closed]

I have mongodb database. I have a collection in that stores time series data, time values are stored as ISODate. Older than few days are not required on database, but required to be backed up in aws ...
0
votes
1answer
156 views

Invalid sync source in mongodb config server

I have 3 config servers 1 primary and 2 secondaries i have received Waring alerts in secondary servers as Log File Monitoring : key = error, File = /var/log/mongodb/mongod.log (mgdb09:log[/var/...
2
votes
3answers
1k views

How to repair mongodb service after an upgrade to Fedora 28?

I just upgraded to Fedora 28 and now my mongod service doesn't launch anymore. One possible solution that would fork in my case would be to be able to downgrade mongodb to 3.4, as the system upgrade ...