Mongodb, mongod does not execute on cmd

Asked

Viewed 1,659 times

0

I’m trying to run Mongodb 3.2 on a 32-bit Windows7 machine, but I’m having trouble running the command mongod in cmd, when I use the command it returns the following error:

2019-09-14T10:39:34.021-0300 I CONTROL [main] 2019-09-14T10:39:34.029-0300 W CONTROL [main] 32-bit Servers don’t have journaling enabled by default. Please use --Journal if you want Durability. 2019-09-14T10:39:34.033-0300 I CONTROL [main] 2019-09-14T10:39:34.184-0300 I CONTROL [main] Hotfix KB2731284 or later update is not insta lled, will zero-out data files 2019-09-14T10:39:34.255-0300 I CONTROL [initandlisten] Mongodb Starting : pid=4268 port=270 17 dbpath=C: data db 32-bit host=Fabricio-PC 2019-09-14T10:39:34.267-0300 I CONTROL [initandlisten] targetMinOS: Windows Vista/Windows S erver 2008 2019-09-14T10:39:34.274-0300 I CONTROL [initandlisten] db version v3.2.22 2019-09-14T10:39:34.292-0300 I CONTROL [initandlisten] git version: 105acca0d443f9a47c1a5bd 608fd7133840a58dd 2019-09-14T10:39:34.301-0300 I CONTROL [initandlisten] allocator: tcmalloc 2019-09-14T10:39:34.318-0300 I CONTROL [initandlisten] modules: None 2019-09-14T10:39:34.331-0300 I CONTROL [initandlisten] build Environment: 2019-09-14T10:39:34.337-0300 I CONTROL [initandlisten] distarch: i386 2019-09-14T10:39:34.343-0300 I CONTROL [initandlisten] target_arch: i386 2019-09-14T10:39:34.349-0300 I CONTROL [initandlisten] options: {} 2019-09-14T10:39:34.358-0300 I STORAGE [initandlisten] Exception in initAndListen: 28663 Ca nnot start server. The default Storage engine 'wiredTiger' is not available with this build of mongod. Please specify a Different Storage engine explicitly, e.g. --storageEngine=mmapv1 . , terminating 2019-09-14T10:39:34.369-0300 I CONTROL [initandlisten] dbexit: rc: 100

Obs: I’ve already created the folders data and db on disk C:\;

what can I do to fix this mistake?

  • 1

    That’s the mistake: The default Storage engine 'wiredTiger' is not available with this build of mongod. Please specify a Different Storage engine explicitly, e.g. -storageEngine=mmapv1 try adding this parameter to the mongod call: --storageEngine=mmapv1

  • worked, thank you very much

2 answers

0

The command must be rotated:

mongod --journall --storageEngine=mmapv1

0


Uninstall Mongodb and delete your folders after installation, you can use Revouninstaller to facilitate.

Follow these steps:

  1. Install Mongodb normally, wait until Compass appears, if does not appear, uninstall and install again. Copy the path from installation, we will need.
  2. Open a command prompt (cmd.exe) as administrator.
  3. Typo: cd C:\
  4. Afterward: md "\data\db"
  5. Afterward: C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" --dbpath="c:\data\db
  6. Give a "CTRL+C" and close cmd.exe.
  7. Copy the installation path to the "bin folder": C:\Program Files\MongoDB\Server\SUA_VERSAO_DO_MONGODB\bin
  8. Example: C: Program Files Mongodb Server 4.2 bin
  9. Go to the system properties and add to the SYSTEM environment variables (search google), the installation path in "PATH":
  10. Double-click PATH in "System Environment Variables",
  11. Then on "New",
  12. Paste the path you copied and press OK.

To test, open a command prompt (cmd.exe) and type "Mongo", if you open the DB console then it is working properly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.