Questions tagged [mongodb]

MongoDB is a document oriented database (also known as NoSQL database).

MongoDB is a document oriented database. It's coded to be fast, scalable and supports natively solutions like sharding, replication, Map/Reduce and storage of files on the DB.

MongoDB doesn't uses SQL, making it a NoSQL database, its data is retrieved using a dynamic query system and returns JSon-style data.

889 questions
6
votes
1 answer

Mongodb install fails in Ubuntu 14.04 docker container

I am trying to install mongodb on ubuntu 14.04 in a docker container, using the following steps from the official mongodb guides in my Dockerfile: RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 RUN echo "deb…
Paul
  • 295
  • 5
  • 10
6
votes
3 answers

Mongo secondaries stuck at startup state

I have a MongoDB replica set with secondaries that won't make it past the STARTUP state. The database is large but they should have moved to STARTUP2 by now. The correct ports are open as I can connect to the secondaries from the primary and…
Cris McLaughlin
  • 161
  • 1
  • 3
6
votes
3 answers

How to start Mongo daemon with auth support

I want to start the MongoDB daemon with auth support using the Mongo init script: sudo /etc/init.d/mongod start I have also added db users to the database to authenticate. I'm working with two files: /etc/init.d/mongod (for init) and…
Scott
  • 163
  • 1
  • 1
  • 4
6
votes
2 answers

Mongo Sharding - Config Server and Mongo Authentication

I am needing to shard a database fairly soon, and am unclear on what the best practice is for enabling authentication on the mongos and config servers. I would like to have everything be secured with passwords. Should each config server have auth…
nakkor
  • 163
  • 1
  • 4
6
votes
1 answer

How can I filter MongoDB Replica Set Heartbeats with tcpdump?

Occasionally, when troubleshooting the health of a replica set, I'd like to filter out the heartbeat packets specifically, track them going out, and the subsequent reply (or lack thereof) without all the noise of the other data that is flowing…
Adam C
  • 5,222
  • 2
  • 30
  • 52
6
votes
1 answer

MongoDB Disaster Prep on AWS

I'm looking for best practice advice covering MongoDB disaster recovery within an AWS hosted environment. Our setup is fairly standard at this point, replica set of 3 servers (1 primary, 1 secondary, and 1 arbitrator), the mongo volumes on primary…
6
votes
1 answer

mongoexport csv output array values

I'm using mongoexport to export some collections into CSV files, however when I try to target fields which are members of an array I cannot get it to export correctly. command I'm using: mongoexport -d db -c collection -fieldFile fields.txt --csv >…
9point6
  • 175
  • 1
  • 1
  • 6
6
votes
1 answer

High CPU usage on mongodb server when idle?

I'm getting strange usage numbers on MongoDB server when it is in almost idle state: http://pastebin.com/cKVyGMts (no queries) DB size is about 3.3 Gb. I can see in mongodb.log that snapshotthread is eating too much CPU: Wed Nov 28 19:02:14…
Andrei Mikhaltsov
  • 3,027
  • 1
  • 23
  • 31
6
votes
5 answers

mongoDB won't connect remotely

I have installed mongoDB on a redhat virtual machine on EC2. The server is running perfectly locally, I can connect and execute commands, etc. Now, I tried connecting remotely from another virtual machine on EC2 but I can't get to connect regardless…
Enrico Tuttobene
  • 227
  • 2
  • 5
  • 11
6
votes
2 answers

what does locked % in mongostat mean?

When running mongostat to look at our mongo database, I'll frequently see the locked % number jump up, sometimes as high as 80%. Here's a few example rows: insert query update delete getmore command flushes mapped vsize res faults locked % idx…
edebill
  • 163
  • 1
  • 4
6
votes
3 answers

MongoDB on NVMe in production

I'm setting up my db production environment and I have some questions. The server has two NVMe disks, but they cannot be used in the hardware RAID controller. Do I need RAID with NVMe? Would it be enough to use them as JBOD in production? Or should…
Green
  • 163
  • 3
5
votes
2 answers

MongoDB "too many files open" even after setting limits

When MongoDB starts up, I am greeted with a "too many files" error, even after editing /etc/security/limits.conf and setting the limit to unlimited. Mar 09 18:29:13 ns524052 mongod[1298]: 2017-03-09T18:29:13.199+0100 I CONTROL [initandlisten] …
inventor02
  • 53
  • 1
  • 1
  • 3
5
votes
1 answer

How to downgrade mongodb 3.4.2 to 2.6.11?

I had mongodb 2.6.11 installed on my CentOS sandbox server. Dec 03 22:24:38 Updated: mongodb-org-mongos-2.6.11-1.x86_64 Dec 03 22:25:07 Updated: mongodb-org-tools-2.6.11-1.x86_64 Dec 03 22:25:08 Updated: mongodb-org-shell-2.6.11-1.x86_64 Dec 03…
Sol
  • 347
  • 1
  • 4
  • 12
5
votes
1 answer

MongoDB rs.initiate error: replSetInitiate quorum check failed because not all proposed set members responded affirmatively

I have to start my own replica set with internal authentication enabled using X.509 certificates, but I failed. Any advice is welcome. MongoDB 3.2 x64 on Debian 8.2 x64. It is a problem from the MongoDB University course "M310: MongoDB Security". A…
Evgeni Nabokov
  • 151
  • 1
  • 2
  • 7
5
votes
1 answer

Why would using MongoDB in lieu of etcd as a key value store be a good or bad idea?

I'd like to get general thoughts from the community as to why MongoDB for key/value would OR would not be a suitable replacement for etcd or other purpose-built key/value store system (consol, zookeeper, etc).
DefionsCode
  • 230
  • 3
  • 9