5

I'm trying to install mongo DB on my local machine with the installer from the official website. But I'm continuously getting this message, can someone help?

enter image description here I've tried the solution provided here but didn't help.

Gagantous
  • 432
  • 6
  • 29
  • 69
Skoby
  • 161
  • 1
  • 2
  • 10

9 Answers9

5

I suggest doing the following:

Hit Win+R to open up you run.exe then inside of it enter services.msc to open up services. Try locating the service under the name of MongoDB Server and set the Startup Type manually to Automatic - [In addition to that, you could set the username and password manually. If you get a message saying the user was granted login as a service right, try hitting retry on the MSI dialog and see if it starts].

Important:
Don't forget to save and close everything (services.msc) before continuing.


Also very important, you should (must) check your .NET framework version and update it to version 4.5 and above. You could download a software like eg Driver Booster to update all of your drivers and additional components that are outdated.

Dženis H.
  • 7,284
  • 3
  • 25
  • 44
3

I ran into the same issue. My problem was the installation location. I was trying to install under C:\MongoDB. I resolved it by installing in the default MongoDb location which is C:\Program Files\MongoDB.

Pholoso Mams
  • 467
  • 1
  • 5
  • 19
  • I was scared that this could be the problem, I have a C:\Bin folder where I keep all binaries (Php, Java, MySQL, et cetera) and it's not the first time that I have problem with permissions with services in this path. Thanks for sharing your solution! – Ares9323 Sep 17 '22 at 11:59
1

For me this is usually an issue with the configuration file %ProgramFiles%\MongoDB\Server\x.x\bin\mongod.cfg

At some time there was an invalid option "snmp" enabled (only valid in enterprise version).

Nowadays, although the installer asks for directories for data and logs it doesn't ALWAYS seem to use these, but defaults to %MONGO_DATA_PATH% or %MONGO_LOG_PATH%, respectively. I don't know where these should be defined, but the server fails at accessing c:\data\db (which doesn't exist). So you have to correct the paths.

JeffRSon
  • 10,404
  • 4
  • 26
  • 51
1

I also faced this kind of error. But I just change the Network service to Local system in Log On As tab.

Follow my step-by-step below to resolve it:

  1. Press Win+R, type: services.msc, then looking for MongoDB Server (MongoDB)

  2. Double click on MongoDB Server (MongoDB).

  3. Then it will open properties tab. On that tab click on Log On
  4. After that check two items i.e. Local System account and Allow service to interact with desktop
  5. After that press Apply and OK button. That's it, cheers!!
  6. Open command prompt and copy the following command:- "C:\Program Files\MongoDB\Server\4.2\bin\mongo.exe"

NOTE: This Tricks is work on my Windows 8.1 PC.

Martin K.
  • 1,168
  • 15
  • 16
Mediad
  • 50
  • 1
  • 8
1

Comment out string with mp: in configuration file: %ProgramFiles%\MongoDB\Server\x.x\bin\mongod.cfg

Like this:

...
#snmp:
#mp:
0

Click Windows+r, type lusemgr.msc , Go to Groups and double click Administrators, Click Add, Click Advanced and click Find Now. Double click in Network Service (in bottom list) and click OK.

It worked for me.

Saba Mulla
  • 11
  • 1
0

Installing in the other locations other than the windows directory caused me this error. Reinstalling the setup with the recommended method of "complete" fixed it.

asans
  • 48
  • 1
  • 5
0

The problem occurs if you have Windows version previous to Windows 10. Install the following update before installing MongoDB. Click on the link below.

https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

It worked for me.

0

The problem occurs if you have Windows version previous to Windows 7. Install the following update by going to below link you have to download Windows6.1-KB2999226-x64.msu

#You have to download and install then go to servies.msu and start MongoDB server by Start also go into log on and set to #local machine

https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows