mongodb无法启动“未知存储引擎”

mongodb无法启动“未知存储引擎”

注:我已检查Mongodb 重启后无法启动并不是同一个问题,

我有一个 Rocket Chat 服务器,重新启动了服务器,现在 Mongod 无法启动。以下是消息:

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

这是/etc/mongod.conf

storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true
  engine: mmapv1
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
net:
  port: 27017
  bindIp: 127.0.0.1
processManagement:
  timeZoneInfo: /usr/share/zoneinfo
replication:
  replSetName: rs01

我的软件包版本:

 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

操作系统是 Debian Buster

我该如何修复它?

答案1

我已经(至少暂时)修复了降级到 mongodb-org 4.0 的问题。之前卸载了 curl 和 libcurl 以及 libcurl4。然后将 repo 添加到 mondo-org:

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

删除 mongodb-org 4.2 并安装 mondodb-org 4.0。

这是因为 mongodb-org 不再支持 mmapv1:https://docs.mongodb.com/manual/release-notes/4.2/#removed-mmapv1-storage-engine

相关内容