Questions tagged [mongodb-3.4]

This tag is for MongoDB major version 3.4

Filter by
Sorted by
Tagged with
1
vote
1answer
2k views

How to run mongod from the commandline?

How do you manually run mongod from the commandline, so it outputs all logging directly in your terminal? I'm trying to diagnose a crashing Mongo 3.4.11 database on Ubuntu 16. When I try and start it ...
1
vote
2answers
6k 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 ...
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 ...
2
votes
1answer
375 views

MongoDb linearizable read concern restrictions

Could someone explain me some part of Mongodb linearizable read concern documentation: Linearizable read concern guarantees only apply if read operations specify a query filter that uniquely ...
-1
votes
1answer
183 views

Differential and log backup on MongoDB

Is it possible to take differential and log backup on mongodb like on microsoft SQL server?
2
votes
0answers
240 views

Quickest way to partially restore a mongodb instance from AWS snapshots?

I have multiple large mongodb clusters running mongodb 3.4 configured with wiredtiger. I would like to set up standalone instances with just a few DBs from these clusters, all on the same EC2 instance....
0
votes
1answer
200 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
2answers
2k views

What is the behavior of null/empty value in compound shard key?

I have a shard key based on {Field1:1,Field2:1} where Field2 can be null. So if two documents have same value for Field1 and null/empty value of Field2 then are they considered to belong to the ...
1
vote
1answer
926 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: {...
2
votes
2answers
5k views

how to set Mongod config set multiple bindIp addresses

I have the following config file: net: bindIp: 127.0.0.1 port: 27017 storage: dbPath: c:\mongoDATA\db journal: enabled: true ##systemLog: ## destination: file ## path: C:\mongoDATA\...
1
vote
0answers
195 views

MongoDB not performing well when set Read from secondary

I have a mongoDB database, with 1 primary and 1 secondary in replicaset(and 1 arbiter). Both the servers are hosted on aws on c4.2xlarge instances(with 1.5 TB of SSD on each). Mongo version of primary ...
1
vote
0answers
266 views

MongoDB 64 on Raspberry Pi 3 with SLES 12 64 bit

I am trying to run MongoDB 3.4 on raspberry pi 3 with an OS which was made by SUSE and SUSE is the only official 64 bit OS for raspberry pi (SLES 12 SP2). I have downloaded the MongoDB from the link ...
4
votes
1answer
3k views

Multiple BindIp in MongoDB 3.4.1 on Debian Jessie

I just upgraded from MongoDB 3.2 to 3.4.1. /etc/mongod.conf had a multiple BindIP: bindIp: [127.0.0.1,192.168.20.1] This is not working anymore. I get this error : Scalar option 'net.bindIp' must ...
0
votes
1answer
350 views

Issue with MongoDB Replication Set

I have 3 "CentOs 7" VM's in AWS environment in which I have setup MongoDB Repication Set using below command. mongod --fork --logpath "/var/rs1/1.log" --replSet yogi --dbpath "/var/rs1/" --port 27017 ...
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 ...
0
votes
1answer
19 views

Mongodb: how to move a member to a backup site?

It is stated in the docs, that any replica set should have an odd number of members. Let's say I have a primary site with 3 members. I need to move one member to a backup site. In order to do this, do ...
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 ...
0
votes
2answers
749 views

mongodb sharded cluster configured but not working

I have configured a sharded cluster on aws on a replicaSet composed on two server, a config server and a front server and mongo 3.4. I followed mainly this tutorial : The configuration seems correct....
0
votes
0answers
1k views

MongoDB collection.count() return 0 after restore

I have restored a 1.74G data into my MongoDB 3.4.4. The mongorestore command returns successfully. But when I run the count on the collection I always got 0. Below is the output: mongos> db.orders....
0
votes
2answers
676 views

Shards error msg “can't use localhost … either use localhost or ipadresses”

I'm trying to set up a a test environment on my pc including sharding. I've added 2 shardservers, a configsvr and a router instance. When i'm trying to add a shard I get following errormsg: "Can't use ...
2
votes
1answer
897 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 ...
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 ...
1
vote
1answer
84 views

Mongo shell 3.2 has different results on sh.isBalancerRunning() as mongo shell 3.4

I have a mongo shards cluster and a mongos instance. These servers are running on MongoDB 3.4.0. When I use mongo shell 3.4.0 to connect to the mongos, I got below output from sh.isBalancerRunning(), ...
1
vote
1answer
1k views

Transferring Mongodb database with rsync while working, is it okay?

I need to transfer MongoDB data from another server with rsync with MongoDB running. Making a dump is not an option for me, as it takes too much time. What problems can I face doing it? Or, if this ...
0
votes
1answer
471 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 --...
1
vote
0answers
194 views

MongoDB WiredTiger cache contents

I'm running MongoDB 3.4.7 cluster (primary + 2 secondaries). Primary's cache usage is 95%, and I try to figure out what the cache contains. I ran collStats for all collections (±18,000) and ...
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
23 views

Is there a way to restrict new database creation to a particular zone?

We have a sharded mongo cluster with a database per client model. Given many roughly same size clients - the default db creation has proven to work well at evenly distributing the load, while avoiding ...
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 ...
4
votes
0answers
1k views

Primary node of MongoDB ReplicaSet constantly high cpu usage

We use mongo replicaSet version 3.4.2 on our production environments. The replicaSet works with 6 nodes , one primary and 5 secondaries. Few weeks ago we have started to get alerts on high cpu ...
0
votes
1answer
157 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 ...
6
votes
3answers
7k views

mongorestore Too many open files

When I run mongorestore I get error running create command: 24: Too many open files. I've updated my launchctl limit and ulimit. When I run lanchctl limit I get: cpu unlimited ...
2
votes
0answers
710 views

MongoDB + WiredTiger cache usage stuck on 95%

I'm running a mongo 3.4.7 cluster (8 CPU, 120GB ram, primary + 2 secondaries) with ±130 open connections, each one of them to a separate DB with ±50 collections. After a few minutes of running, cache ...
-1
votes
1answer
388 views

139 : Failed with error 'aborted', from rs4 to rs1

aborted in mongodb in logs i found 2017-09-14T01:35:21.533+0900 W SHARDING [conn38309] Chunk move failed :: caused by :: ChunkRangeCleanupPending: can't accept new chunks because there are still 4 ...
13
votes
2answers
29k 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 ...
2
votes
2answers
654 views

MongoDB Write Concern when Journaling is off

I'm running mongo 3.4.7 (WiredTiger) replica set with two secondaries. According to the docs, when journaling is enabled and write concern is {w: "majority", j: 0}, the ack is sent after the data is ...
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?
3
votes
2answers
10k views

How to set up a user who doesn't have `admin` database access but use it as authentication database?

I want to setup a user in MongoDB. This user will not have admin database access. But it uses admin as authentication database. It will fail to connect the mongoDB by this command mongo --host ...
0
votes
1answer
75 views

MongoDB Replica Set & Data Sync behavior

I have a replica set with 3 nodes X, Y & A (where A is an arbiter). Currently X is assigned a higher priority than Y. When X goes down, Y becomes the PRIMARY. When X is back in action, the data ...
0
votes
2answers
192 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
1answer
740 views

created a user with clusterMonitor and dbOwner role, but db.getRoles() shows enableSharding role

I created a user with full privileges in it's own database (dbOwner) and read-only access to administrative commands (clusterMonitor) use customerdb (mongod-3.4.7) customerdb> db....
1
vote
1answer
2k 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 ...
1
vote
1answer
2k views

MongoDB config replica failed connection after a few days running

I have setup a MongoDB shard cluster. It has three shard replicas, each replica has three mongo instances. And it has one replica of 3 mongo config servers. And one mongos. It works fine at the ...
0
votes
2answers
656 views

$out not working in mongodb Sharding

I am bit stuck in MongoDB while exporting my output to some other collection. Scenario : Actually, i want to query out my result to another collection which is successful in normal mongoDB( without ...
0
votes
1answer
263 views

ensureIndex failed to create index on primary shard: Cannot accept sharding commands if not started with --shardsvr

After creating shards in replica set and also setting up config servers, when I try to add a collection to my shards then I get below error : { "ok" : 0.0, "errmsg" : "ensureIndex failed to ...
2
votes
1answer
6k views

Recover MongoDB data without WiredTiger.wt file

We have recovered a MongoDB database from filesystem, but the WiredTiger.wt file has changed since then (i.e. the collection has been dropped). So is it possible to read data (documents) from some ....
2
votes
1answer
3k views

MongoDB secondary node does not become primary when other nodes are stopped

I want to cluster MongoDB by using a replica set. I have created a three-node replicaset (rs0,rs1,rs2), and run the DBs in parallel with no issues. But when I shut down any two instance (one primary ...
0
votes
2answers
549 views

How to define shardKey on GridFS collections to achieve Location/Data Centre affinity (MongoDB)

I have set up a mongo cluster as follows: 3 shards, one per global region APAC/EMEA/AMER (in different data centres) Shard Key is REGION + 'MONOTONICALLY INCREASING PRIMARY KEY' The "writing" clients ...
2
votes
2answers
7k 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/...
0
votes
1answer
73 views

Detailed behaviour of mongos in context of sharded Mongo cluster

I have a mongo cluster as follows: 3 shards, located in the 3 main global regions (APAC/EMEA/AMER) The shardKey is "Region". Each region has a mongos running locally, "close" to its users, "close" to ...