Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDb shuts down with Code 100 [closed]

Tags:

mongodb

I followed the MongoDb Docs to setup my first MongoDb,

When I start MongoDB using the command

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe 

I get the following error enter image description here

like image 288
Aravind Avatar asked Jan 02 '17 01:01

Aravind


People also ask

How do I stop MongoDB from running Ubuntu?

Additionally, if you have installed MongoDB using a package manager for Ubuntu or Debian then you can stop mongodb (currently mongod in ubuntu) as follows: Upstart: sudo service mongod stop. Sysvinit: sudo /etc/init. d/mongod stop.

What does mongod command do?

The main purpose of mongod is to manage all the MongoDB server tasks. For instance, accepting requests, responding to client, and memory management. mongo is a command line shell that can interact with the client (for example, system administrators and developers).

Which command helps you to shutdown a MongoDB server?

shutdown or db. shutdownServer() command was run, mongod only continues the shut down steps if the force field is true, or a. SIGTERM signal was sent to mongod , mongod always continues the shut down steps.


1 Answers

MongoDB needs a folder to store the database. Create a C:\data\db\ directory:

mkdir C:\data\db 

and then start MongoDB:

C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe 

Sometimes C:\data\db folder already exists due to previous installation. So if for this reason mongod.exe does not work, you may delete all the contents from C:\data\db folder and execute mongod.exeagain.

like image 195
cespon Avatar answered Sep 28 '22 13:09

cespon