Note: I checked Mongodb doesn't start on reboot and is not the same problem,

I had a rocket chat server, rebooted the server and now mongod cannot start. These are the messages:

2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] ** WARNING: Support for MMAPV1 storage engine has been deprecated and will be
2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] **          removed in version 4.2. Please plan to migrate to the wiredTiger
2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] **          storage engine.
2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/deprecated-mmapv1
2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] 
2020-06-01T21:39:05.566-0300 I  STORAGE  [initandlisten] exception in initAndListen: Location18656: Cannot start server with an unknown storage engine: mmapv1, terminating
2020-06-01T21:39:05.567-0300 I  NETWORK  [initandlisten] shutdown: going to close listening sockets...
2020-06-01T21:39:05.567-0300 I  -        [initandlisten] Stopping further Flow Control ticket acquisitions.
2020-06-01T21:39:05.567-0300 I  CONTROL  [initandlisten] now exiting
2020-06-01T21:39:05.567-0300 I  CONTROL  [initandlisten] shutting down with code:100

This is /etc/mongod.conf:

  dbPath: /var/lib/mongodb
    enabled: true
  engine: mmapv1
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
  port: 27017
  timeZoneInfo: /usr/share/zoneinfo
  replSetName: rs01

My packages versions:

 dpkg -l | grep mongo
ii  mongodb-org                     4.2.7                        amd64        MongoDB open source document-oriented database system (metapackage)
ii  mongodb-org-mongos              4.0.13                       amd64        MongoDB sharded cluster query router
ii  mongodb-org-server              4.2.7                        amd64        MongoDB database server
ii  mongodb-org-shell               4.0.13                       amd64        MongoDB shell client
ii  mongodb-org-tools               4.0.13                       amd64        MongoDB tools

And OS is Debian Buster

How can I fix it?


I've fixed (at least temporarily) downgrading to mongodb-org 4.0. Previously uninstalled curl and libcurl and libcurl4. Then added the repo to mondo-org:

cat  /etc/apt/sources.list.d/stretch.list
deb http://deb.debian.org/debian stretch main contrib

Remove mongodb-org 4.2 and installed mondodb-org 4.0.

That's because mongodb-org does not support mmapv1 anymore: https://docs.mongodb.com/manual/release-notes/4.2/#removed-mmapv1-storage-engine

| improve this answer | |
  • I'm curious ... why are you still using MMAPv1? I'd recommend upgrading to the modern WiredTiger storage engine which has more integrity, performance, and features than MMAPv1. Rocket Chat also recommends WiredTiger. – Stennie Jun 9 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.