Questions tagged [mongodb-3.4]

This tag is for MongoDB major version 3.4

Filter by
Sorted by
Tagged with
0
votes
1answer
211 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 ...
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, ...
2
votes
1answer
393 views

How to disable ChunkManager logging for MongoDB? mongoconfig.log gets huge

I'm using MongoDB 3.4 for saving other systems logs and mongoconfig.log is getting too much verbosity. It's a sharded clusted, if that helps. I checked the default mongo log verbosity and is set at ...
0
votes
1answer
107 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 ...
1
vote
2answers
438 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: ...
0
votes
0answers
27 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, ...
1
vote
1answer
1k views

What's the difference between DISTINCT_SCAN and IXSCAN in explain output?

In Mongo 3.4 explain("executionStats").distinct(...), for some queries the winning plan contains an IXSCAN step, and for other queries it contains an DISTINCT_SCAN step. What is the difference ...
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
1answer
954 views

Mongodb: Determining shard key strategy on compound index

I have a collection with 170 millions+ documents and it is only going to increase. The size of the collection is not that huge, currently around 70 GB. The collection has two fields indexed on: {...
0
votes
1answer
847 views

Could not add Replica Set to MongoDB Shard

I want to deploy a MongoDB Cluster for testing on 3 Virtual Machines using Docker. On the first Virtual Machine I have the Router Instance and a Replica Set of the 3 Config Servers. The second ...
3
votes
1answer
251 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
917 views

Authenticate MongoDB shard cluster in Docker swarm

I am trying to put authentication to the mongo shard cluster which is running in docker swarm. docker-compose.yml file: version: "3.3" services: cfg1-r1: image: mongo:3.4.9 ...
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
11 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
1answer
159 views

In MongoDB serverStatus(), what is the meaning of “connection data handles currently active”?

When running db.serverStatus() in the MongoDB shell (3.4, WiredTiger), the results contain the following data: { "connection data handles currently active" : 94862, "connection sweep ...
0
votes
0answers
34 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....
3
votes
2answers
7k views

MongoDB Maxing CPU Usage

I have a weird one here. We have set up our production MongoDB which was populated by our test one so we had something to work off of. As soon as we started the service we hit instant 100% CPU load ...
2
votes
1answer
3k views

How to add `--sslAllowInvalidCertificates` on mongodb uri?

I have a mongodb server requires x.509 certificate. So I have to use --sslPEMKeyFile and --sslCAFile on mongo shell command to connect to that server. It works fine. In my dev environment, I am using -...
0
votes
1answer
164 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 "...
1
vote
1answer
133 views

Switching from 2 large collections to multiple small ones in MongoDB 3.4

I know this question is similar to other ones. But... Only that we are switching from 2 very large collections (15Gb in size, constantly growing). Basically those 2 large collections keep different ...
0
votes
1answer
206 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 ...
0
votes
2answers
200 views

Can MongoDB manage balancing between the Mongos Dynamically using TCP Balancer

If I have a business where I maintain 10 applications and I need to divide the request load of these 10 applications between 3 Mongos Dynamically. Like the TCP Loadbalancer need to connect to MongoDB ...
0
votes
0answers
15 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
1answer
207 views

Error Message while executing command in Arbiter for log rotation

While running the command in the shell db.adminCommand( { logRotate : 1 } ) of arbiter it showing an error message as not authorized to run this command but in primary and secondary of replicaset its ...
0
votes
0answers
12 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
1k 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"}) ...
0
votes
1answer
486 views

Mongodb - Error after turning fork mode on

I am working on installing mongodb on remote server I managed to install everything and tested it. But when I tried to enable fork mode to make it run in the background via the command mongod --...
0
votes
1answer
25 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 ...
1
vote
2answers
7k views

mongo crashing due to too many open files

I recently upgraded an Ubuntu 14 server, running mongo 3.4.11, to Ubuntu 16. I re-installed the identical version of mongodb-org from their PPA, but now when I start mongo, it's doesn't respond to ...
2
votes
1answer
53 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
1answer
1k views

MongoDB 3.4 Server not starting with bind error following a CentOS 7.4 security update

MongoDB 3.4 server is failing to start following a CentOS security update and reboot. No configuration changes made. The previous update and reboot a couple of days earlier did not cause any ...
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 ...
4
votes
3answers
20k views

How to views all documents in a particular collection of database in MongoDB through mongo Shell?

In the MongoDB shell, how to views all documents in a particular collection for the current database that I'm using? when i am trying through the query > db.getCollection().find() To getting ...
2
votes
2answers
8k views

service mongod cant start, permission denied mongod.lock when changing dbpath

What i want to do: change dbpath of mongodb from /var/lib/mongodb to /home/user/mongodb/data im using db version v3.4.7 what i've done mkdir -p ~/mongodb/data sudo chown -R mongodb:mongodb /home/...
1
vote
1answer
167 views

Could we recover Mongo records from the data files only without namespace files?

I am missing a namespace file from the Mongo db path. I only have data files with number extensions (e.g. report.4,report.5). Is there any way to recover the mongodb dump from the data files?
-1
votes
1answer
186 views

Differential and log backup on MongoDB

Is it possible to take differential and log backup on mongodb like on microsoft SQL server?
0
votes
1answer
29 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?
13
votes
2answers
30k views

How to specify authentication database and target database separately on mongodb connection uri?

I am using this connection uri to connect to mongodb: mongodb://user:password@localhost/admin. It will use admin as bot authentication and target database. How can I make the uri to use admin as ...
0
votes
0answers
50 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', ...
3
votes
1answer
5k views

MongoDB Shutting down. Signal 15

Using MongoDB in a live server. Everyday in the morning, I find that mongod process is shutdown. The mongodb log is as follows: 2017-11-02T11:19:49.173+0000 I FTDC [initandlisten] Initializing ...
1
vote
1answer
3k views

How to find sources of connections to Mongodb?

In the Mongodb, I can see there are 54 connections from different applications in my local server. Is there anyway to see which one of my applications are using Mongodb more than the others? Imagine I ...
0
votes
0answers
10 views

Can two or more versions of MongoDB run concurrently as Windows services?

I'm working on two .Net projects which use different versions of MongoDB (3.4 and 4.0). By using separate data and log directories (as per this article) I can run both versions concurrently on demand ...
0
votes
0answers
35 views

Mongodb - AssertionException

Been getting the below exception in huge volume in the logs of mongos. "connection accepted from AssertionException handling request, closing client connection: 17189 The server is configured to only ...
1
vote
0answers
79 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 ...
0
votes
0answers
14 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: { ...
1
vote
0answers
216 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/...
-3
votes
1answer
94 views

How to view and export database content? [closed]

I'm trying to view the actual entries, not the backend identifiers. > db.<collection>.find({"_id": "486b4ca55b144b119f4551417c5798c8"}).pretty() { "_id" : "...
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
190 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
441 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,...