Questions tagged [mongodb-3.4]

This tag is for MongoDB major version 3.4

125 questions
16
votes
2 answers

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 authentication but allow me to connect to a different…
Joey Yi Zhao
  • 577
  • 3
  • 9
  • 23
11
votes
3 answers

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 unlimited filesize unlimited unlimited …
Wylliam Judd
  • 163
  • 1
  • 1
  • 7
9
votes
4 answers

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 the error as mention below 2017-10-14T00:57:34.363+0530…
Md Haidar Ali Khan
  • 6,523
  • 9
  • 40
  • 62
7
votes
0 answers

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 progress bar, and now I'm trying to load the archive…
Cerin
  • 1,425
  • 6
  • 29
  • 38
6
votes
1 answer

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 be a single value According to the documentation,…
hotips
  • 163
  • 1
  • 4
6
votes
1 answer

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 --sslAllowInvalidCertificates parameter. It works…
Joey Yi Zhao
  • 577
  • 3
  • 9
  • 23
6
votes
2 answers

Mongodb Secondary Node not recovering

Secondary node of mongodb cluster has entered in Recovering state and it's not coming out of it. Below is what I see in log. I know one way to fix this issue is to reinitialize secondary node by deleting data directory and restarting secondary. But…
Rishi Saraf
  • 163
  • 1
  • 1
  • 4
5
votes
2 answers

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 between the two? Is one of them faster than the other?
Tzach
  • 307
  • 3
  • 12
4
votes
1 answer

Why $group is very slow in aggregation and how can faster it in MongoDB

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: { _id: { employee_id:"$employee_id", …
Abhilash Lohar
  • 41
  • 1
  • 1
  • 2
4
votes
2 answers

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
Mouna Vignesh
  • 73
  • 1
  • 5
4
votes
3 answers

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\log\mongodb.log ## logAppend: true this works,…
DCR
  • 171
  • 1
  • 2
  • 8
4
votes
0 answers

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 consumption on the primary node. At the beginning we…
4
votes
2 answers

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 localhost admin. Instead, it can use this command to…
Joey Yi Zhao
  • 577
  • 3
  • 9
  • 23
4
votes
1 answer

Service mongod fails after adding security.keyFile in config file

My mongo.conf: # where to write logging data. systemLog: destination: file logAppend: true path: /var/log/mongodb/mongod.log # Where and how to store data. storage: dbPath: /var/lib/mongo journal: enabled: true # engine: # mmapv1: #…
3
votes
1 answer

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. Should I be concerned about this? >
Gleeb
  • 131
  • 2
1
2 3
8 9