mongodb服务无法启动

时间:2019-12-05 11:41:53

标签: mongodb ubuntu

我在我的数字海洋mongodb小滴上进行了4.2.1 ubuntu 18.04 LTS的全新安装。由于某些奇怪的原因,服务守护程序无法启动。

019-12-05T11:35:31.148+0000 I  CONTROL  [main] ***** SERVER RESTARTED *****
2019-12-05T11:35:31.153+0000 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] MongoDB starting : pid=1291 port=27017 dbpath=/var/lib/mongodb 64-bit host=ubuntu-s-1vcpu-2gb-blr1-01
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] db version v4.2.1
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] git version: edf6d45851c0b9ee15548f0f847df141764a317e
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] allocator: tcmalloc
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] modules: none
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] build environment:
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten]     distmod: ubuntu1804
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten]     distarch: x86_64
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten]     target_arch: x86_64
2019-12-05T11:35:31.167+0000 I  CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "0.0.0.0", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: $
2019-12-05T11:35:31.169+0000 E  STORAGE  [initandlisten] Unable to read the storage engine metadata file: FileNotOpen: Failed to read metadata from /var/lib/mongodb/storage.bson
2019-12-05T11:35:31.169+0000 F  -        [initandlisten] Fatal Assertion 28661 at src/mongo/db/storage/storage_engine_metadata.cpp 89
2019-12-05T11:35:31.169+0000 F  -        [initandlisten]

1 个答案:

答案 0 :(得分:1)

Unable to read the storage engine metadata file: FileNotOpen: Failed to read metadata from /var/lib/mongodb/storage.bson-v3.6中的文件格式不适用于v4.2。

阅读how to upgrade。本质上:

  

要从4.0系列之前的版本升级,必须连续升级主要版本,直到升级到4.0系列为止。例如,如果您运行的是3.6系列,则必须先升级到4.0,然后才能升级到4.2。