Questions tagged [mongodb]

MongoDB is a scalable, high-performance, open source, document-oriented database. Official builds are available for Linux, Windows, OS X and Solaris. Database administration questions are generally better suited to dba.stackexchange.com

Filter by
Sorted by
Tagged with
37 votes
7 answers
186k views

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 command returns error

I'm trying to install Mongodb on Ubuntu 12 but when I run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 This returned the error below: keyserver.ubuntu.com host not ...
nyamka's user avatar
  • 371
36 votes
4 answers
19k views

Error: mongodb: unknown version :mountain_lion

I am running these simple commands on mac: brew upgrade mongodb or brew install mongodb I am getting this error below: Error: mongodb: unknown version :mountain_lion If i run the simple ...
Tray Fleary's user avatar
13 votes
1 answer
13k views

How does the protocol "mongodb" work?

To connect to a MongoDB database from a NodeJS application, the documentation says to connect an address like this one: mongodb://localhost:27017/myproject where mongodb is the protocol, in place of ...
CodyBugstein's user avatar
  • 1,575
9 votes
2 answers
30k views

.tgz file – tar: Unrecognized archive format

I'm trying to install a 10gen build of MongoDB on my local Mac running Mountain Lion (10.8.3): I fetch it with curl at: curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > ...
AlienWebguy's user avatar
7 votes
1 answer
7k views

Why journaling use so much space in mongodb?

I have a mongodb database that uses approximately 1GB of space. I was surprised when my server ran out of space, and then I realized that the journal uses 3GB. The documentation says that "Once ...
lfagundes's user avatar
  • 181
6 votes
1 answer
3k views

Can't start mongodb by launchctl on OS X Yosemite (10.10.2)

I've installed mongodb 2.4 via homebrew: brew install homebrew/versions/mongodb24 Then I've made a simlink to the config provided by homebrew: ln -sfv /usr/local/opt/mongodb24/homebrew.mxcl....
schfkt's user avatar
  • 171
5 votes
2 answers
5k views

How to automatically restart MySQL and MongoDB when being unresponsive?

I’m running a simple development server (Ubuntu) on which MySQL and MongoDB sometimes crash. I always restart them with sudo service mysql restart. Although I know I need to investigate why they ...
kramer65's user avatar
  • 1,434
5 votes
3 answers
16k views

After upgrading PHP to version 7, why can't I use the mongodb driver?

Well here's an odd situation I've found. I've been using PHP and MongoDB together on a project, and updated the associated software. After the upgrade, I did make sure to update the new conf files and ...
dotVezz's user avatar
  • 839
5 votes
1 answer
5k views

Is MongoDB caching queries?

I am using MongoDB as my database for NodeJS system what working heavily with it database. I am using Mongoose module as database controller. My question is: Is MongoDB or Mongoose somehow caching ...
Baterka's user avatar
  • 133
5 votes
1 answer
11k views

MongoDB: Getting SSL peer certificate validation failed: self signed certificate

I followed this tutorial to create a both a root CA certificate and then used it to sign a key for the mongod server. I run monogd with this configuration, by following this doc: net: ssl: ...
sagioto's user avatar
  • 51
4 votes
3 answers
21k views

Mongodb not shutting down via --shutdown command

i need help with a problem on shutting mongod down gracefully. I'm running mongodb on docker . i run mongod like with the command : mongod --config /etc/mongod.conf and when i close with : ...
kommradHomer's user avatar
4 votes
2 answers
3k views

MongoDB: Can't drop local database with root user

I am trying to drop the local database in my replica set so that I can rename the replica set, but I keep getting the below error errmsg" : "not authorized on local to execute command { dropDatabase: ...
siddhu's user avatar
  • 195
4 votes
2 answers
3k views

Sign in with mongo shell without having my password shown?

How can I sign into the mongo shell without showing my password? Everything says to either use mongo -u user -p password --authenticationDatabase admin or mongo > use admin; > db.auth('user', ...
Corey Ogburn's user avatar
4 votes
1 answer
497 views

Server Separation to avoid attacks?

I currently have 1 server with a full LAMP stack on it as well as Mongo DB. Is there any benefit to spliting up these services onto different servers in regards to redundancies? For example: Server ...
user1641165's user avatar
3 votes
2 answers
13k views

Unable to connect to mongodb running in virtualbox (host: Mac OS, guest: CentOS)

I am using CentOS 7 in a virtualmachine running on Mac OS X using Virtualbox. Unfortunately I am not able to connect to the VM's database from my Mac OS host. I am using NAT as network for the VM and ...
albert's user avatar
  • 283
3 votes
3 answers
4k views

Systemd: Autostart service after mongodb

ubuntu16.04.1, systemd An application depends on mongodb. The application and mongodb both start on boot as services. app.service containts next line: After=network.target mongod.service ...
Vladimir Gamalyan's user avatar
3 votes
2 answers
5k views

PHP: Mongo client not found

I've installed XAMPP on my MacBook. PHP and MySQL are working fine, so I followed it up with mongo. I did the following: brew install mongo (success) brew install autoconf (success) sudo /...
zack_falcon's user avatar
  • 1,033
3 votes
1 answer
8k views

Command Prompt random pause

I am developing a site using Node.js and MongoDB, both of which are run from the Windows Command Prompt. Occasionally one or both of the programs freezes (no output to console, not accepting incoming ...
user2248702's user avatar
3 votes
1 answer
9k views

MongoDB, Using mongorestore on an .agz file

I am using MongoDB 3.6 and am having trouble understanding how to use mongorestore on an .agz file. If I specify the below, then I get an error saying Failed: error connecting to db server: no ...
siddhu's user avatar
  • 195
3 votes
1 answer
2k views

Installing MongoDB on Debian conflict

When installing MongoDB I encountered conflict. How do I tell which package it conflict with? I tried both aptitude and apt-get, and I tried the 10gen version as well. But I’ve no idea what it is in ...
huggie's user avatar
  • 1,199
3 votes
1 answer
2k views

Bash script help | mongoDB

I am writing a bash script which uses mongoimport utility to add data to the database. The following command runs successfully: $ mongoimport -h localhost:27017 -d test -c ecg --fieldFile data/...
Aman's user avatar
  • 31
3 votes
0 answers
1k views

zsh: killed in Terminal

After trying to install mongoDB on macOS Ventura, I'm getting error zsh: killed. When I open Terminal, I see: zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR" Whenever I try to run a ...
Диана Середа's user avatar
3 votes
0 answers
1k views

repair mongodb 4 after crash due to a full storage

I have an issue on mongod. One day ago , my hard disk storage was full so mongodb shut down. I add Go on my hard disk and now when i want to restart my mongo , it doesn't work . I m on unbutu 16 ...
thomas poidevin's user avatar
3 votes
0 answers
426 views

Mongodb PHP Driver MacOS Unsigned package error

I installed MongoDB driver for PHP with the following command sudo pecl install mongdodb I had to disable "csrutil" at reboot to be able to run the above command. After installing the package I ...
user11374022's user avatar
3 votes
0 answers
715 views

Configuring PHP for MongoDB on Mac OS X Sierra

I'm having some difficulty configuring PHP to integrate with MongoDB on my Mac. I can confirm that PHP is running correctly, and the php.ini file I am tinkering with is the correct one (I can see ...
HomerPlata's user avatar
2 votes
1 answer
13k views

mongod start failed (monogdb 3.0.2, database storageEngine-wiredTiger)

I was using mongodb for a month yesterday morning after unusual shutdown my mongodb is failing to start. Here I am using wiredTiger Storage Engine, I think the wiredTiger.wt file got corrupted but I ...
naveen dahiya's user avatar
2 votes
2 answers
1k views

Connect MongoDB to Tableau or Microsoft Power BI for real-time analysis

I have a website whose database is MongoDB, I want to track KPIs and analyse them in real-time. I am thinking of Tableau and Microsoft Power BI. But I have not found how to connect MongoDB to them in ...
SoftTimur's user avatar
  • 1,257
2 votes
1 answer
3k views

MongoDB in Docker claims user was successfully created, but login still fails

I am trying to construct a Docker image with MongoDB w/auth and a configured user. However, even though creating the user works, I can't seem to use that user. The application is a Dropwizard 0.8 ...
Janus Troelsen's user avatar
2 votes
1 answer
5k views

Putty SSH Tunnel Portforwarding not working with remote MongDB database

I'm having trouble connecting to a remote database server. I'm on a Windows 10 client and can successfully connect to my Ubuntu 16 server with putty over SSH, including with a keypair. Now I have a ...
r .r's user avatar
  • 141
2 votes
1 answer
4k views

Install mongodb 2.6 with homebrew

How can I install mongodb 2.6 with homebrew? Here is what I am trying: oobarbazanoos-MacBook-Pro:~ oobarbazanoo$ brew install mongodb@26 Error: No available formula with the name "mongodb@26" ==>...
hellomates's user avatar
2 votes
1 answer
11k views

Mongo cannot see libssl and libcrypto files

Im using Linux Mint 17.1 and yesterday I tried to upgrade MongoDb. I upgraded to Mongo 3.4.4 by first downloading the tgz file and copying all the contents of its bin/ folder to /user/bin/. I then ...
Mark's user avatar
  • 123
2 votes
2 answers
7k views

Trying to reinstall MongoDB using Yum. First it says package is not installed, then it says already installed?

I have a problem with a service, it fails to start. I am trying to troubleshoot it by re-installing it. When I try to start or stop the service I see the following: When I try uninstalling MongoDB ...
Surgetheurge's user avatar
2 votes
1 answer
3k views

alias not working with my mongo --eval command

I have the following mongo shell command to delete all users that aren't admins mongo --eval 'db.users.remove({group:{$ne:"admin"}})' collection This works. I want to create an alias for this ...
laggingreflex's user avatar
2 votes
1 answer
324 views

MongoDB server doesn’t close when pressing Ctrl+C after changing the system date to a date in the past

I'm currently using MongoDB 3.4.4. I run MongoDB using the mongo_start batch file. I normally close the shell that appears using ctrl+c and it works most of the time. But when I roll back the system ...
berdy's user avatar
  • 21
2 votes
1 answer
5k views

Conflict when installing MongoDB

I have a server with CentOS 7, I would like to install mongoDB. I tried installing it typing: sudo yum install mongodb with no problems, then I do mongod I get: -bash: mongod: command not found If ...
Sredny M Casanova's user avatar
2 votes
1 answer
86 views

Linux multi-tasking

I'm working on deploying a node project to a Linux box on amazon EC2. The project uses mongoDB. I'm trying to run node and mongoDB simultaneously on the box but I'm unfamiliar with linux. Is it ...
Eogcloud's user avatar
  • 123
2 votes
0 answers
3k views

how can I upgrade mongodb directly from 4.4 to 6.0?

After recent OS upgrade my mongodb is upgraded to 6.0. Then I have following error: "msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an ...
Wang's user avatar
  • 842
2 votes
0 answers
118 views

I forgot the VMs password, can I retrieve it from MongoDB Compass?

Hi, I have a VM that I forgot the password to. However, I store a database there (which unfortunately is not backed up) and it's no longer responding for some unknown reason. There is an agent that's ...
Ms01's user avatar
  • 111
2 votes
0 answers
241 views

Expose MongoDB from docker container

I am trying to expose my mongodb that is running in a docker container to be accessible from the outside. I found out that it should be able with docker compose or the mongod.conf file to set the ...
Kai's user avatar
  • 161
2 votes
1 answer
933 views

SCons build with development gcc8

I'm attempting to build MongoDB v4.0 on CentOS7 (https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source), and am unfamiliar with the python toolset included for building. The toolset requires ...
gangr33n's user avatar
2 votes
1 answer
4k views

Invalid domain/user/password while installing mongoDB on Windows10

No idea why it is unable to install. I tried my window account the one I use to log in to my PC doesn't work either. So can anyone help me solve this problem?
Troy Wu's user avatar
  • 21
2 votes
0 answers
296 views

lvcreate vg0 not found

I am looking at the mongodb documentation for creating a logical volume with lvcreate. lvcreate --size 100M --snapshot --name mdb-snap01 /dev/vg0/mongodb The example is the output is: Using ...
staminna's user avatar
  • 151
2 votes
1 answer
183 views

Init script changes for MongoDB

We have MongoDB (Version 3.0) in production in standalone as well as in cluster mode. Currently we were facing issue that basically states: Unclean shutdown detected hence unable to start mongod. ...
user598529's user avatar
2 votes
0 answers
1k views

MongoDB ServerSelectionTimeoutError: No servers found yet

I've got a mongodb instance running on a standard AWS Ubuntu 14.04 server. After some trouble (upgrading the server using sudo mongod --upgrade --dbpath /var/lib/mongodb/) I now have the server ...
kramer65's user avatar
  • 1,434
2 votes
0 answers
6k views

How do I uninstall MongoDB on MacOSX?

My installation is not from MacPorts or Homebrew. I did it from the 10gen build as specified in http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
Madhu's user avatar
  • 21
2 votes
2 answers
2k views

Cannot access MongoDB from the Internet

I am using MongoDB database, which is installed with the IP address 126.22.252.25. The Ubuntu version info is 12.04.3 LTS. My MongoDB uses the default 27017 port. On this local machine I can use ...
VicoWu110's user avatar
1 vote
1 answer
18k views

Mongo can't start service

I have Ubuntu 16.04. And reinstall mongobd following tutorial on oficial mongo site - https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ As result i have: mongo -version MongoDB ...
Viktor Kushnir's user avatar
1 vote
2 answers
4k views

Mongodb: Log file remains empty

Yesterday I moved 2 files from /var/log/mongodb to an other directory. The file names: "mongod.log", "mongod.log.1" (the only 2 files in this directory with large size). The mongodb was running at ...
jcomouth's user avatar
  • 113
1 vote
3 answers
28k views

Class 'MongoDB\Driver\Manager' not found

I am creating REST APi with Lumen framework. I use Mongolab for my mongoDB and i want to host my app on google App Enginge. I am using Jessenger lib for communicating with my DB on MongoLab. Everhting ...
Viktor Petrovski's user avatar
1 vote
1 answer
1k views

Can Node JS connect to MongoDB and mySQL simultaneously?

I have a developer that says Node JS can only connect to multiple databases on the same server. I would like her to be able to connect to MongoDB and mySQL at the same time ... Is it possible? And ...
OregonDean's user avatar