Questions tagged [mongodb-3.4]

This tag is for MongoDB major version 3.4

Filter by
Sorted by
Tagged with
1
vote
0answers
247 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
254 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
605 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
18 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 ...
2
votes
1answer
3k 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
458 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
723 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
449 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 ...
1
vote
1answer
710 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
2answers
12k 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
70 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(), ...
0
votes
1answer
736 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
290 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
164 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
1k 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
21 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
1answer
5k 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
883 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
111 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 ...
3
votes
3answers
4k 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 ...
1
vote
0answers
558 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
306 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 ...
9
votes
2answers
17k 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
487 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
153 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
7k 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
63 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
110 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
464 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....
0
votes
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
557 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
241 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
4k 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
2k 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
428 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 ...
1
vote
1answer
4k 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
66 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 ...
0
votes
1answer
65 views

MongoDB - Stand Alone Server Security SSL or SSH

We've outgrown our current server and decided to move to two servers, one to host our apps, and one to hold our database. We looked into clustering and we don't feel we need to scale horizontally just ...
0
votes
1answer
592 views

UnknownError: error while getting last oplog entry for begin timestamp: find command not yet implemented

I have 2 mongoDBs. One running as PRIMARY, its version is 3.0.13. The other works as SECONDARY in the replica set, its version is 3.0.11. Replication works perfectly at this point. I want to add a ...
0
votes
1answer
2k views

E11000 duplicate key error While Adding Shard

I have setup a replica set and want to add it in a mongos. But I got below error in mongos: mongos> sh.addShard("rs3/172.19.0.12:27017,172.19.0.6:27017,172.19.0.5:27017") { "code" : 11000, ...
0
votes
2answers
3k views

MongoDB 3.4 Sharding Error. “Cannot accept sharding commands if not started with --shardsvr”

I have installed mongoDB 3.4.5 in centOS 7.2 machine. I am configuring sharding in standalone mode. Steps I followed: For Replica Sets: mongod --replSet rs0 --dbpath /data/srd/rs0 --logpath /data/...
-1
votes
1answer
207 views

Duplicate data inserted while failover MongoDB

I'm inserting 3000 documents and in between my primary goes down and secondary becomes new primary I find my application has inserted 3002 documents, 2 documents are duplicate. What could be the ...
1
vote
2answers
406 views

Is MongoDB IXSCAN operator a scan or a seek?

It seems to me that the only operators I see in a MongoDB query plan are COLLSCAN or IXSCAN. The indexes being b-tree, I guess MongoDB can do index seek and index scan ? If so, how do we know that a ...
1
vote
1answer
565 views

How to validate mongodb backup and restore

I am using mongodump to create a backup of the db based on some query params and mongorestore to restore the same in another mongodb in a diff environment. How can I validate whether the dump created ...
-1
votes
1answer
519 views

Benchmarking Mongodb Queries Without cache

I want to benchmark some Mongodb queries by calculating their execution time but I could not find a way to do so without caching : The first time I execute a query it takes a decent amount of time and ...
0
votes
0answers
492 views

Long service startup time for MongoDB?

I loaded a 10GB database into my local MongDB server, and now if I stop/start it, it takes about 10 minutes to fully come "up". Attempting to connect to the local database with mongo returns the error:...
2
votes
1answer
393 views

Why `distinct` and `count` operations generate `“op”: “command”` in system.profile

According to documentation count and distinct queries should result in op = count and op = distinct in system.profile. However when I tried to run such queries in shell both were generated as op = ...
3
votes
0answers
2k views

How to see progress of mongorestore?

Is there any way to get a progress measure or remaining time estimate from mongorestore? I used mongodump to export a compressed archive, which generated an 8GB file in about an hour and showed a ...