MongoDB Storage Engine Error Detected MMapV1 and wiredTiger
-
You find MongoDB cannot start and this relevant bit is in the logs: Detected data files in /var/lib/mongodb created by the 'mmapv1' storage engine, but the specified storage engine was 'wiredTiger'., terminating
Like below. This means that your database configuration is set to wiredTiger (the new engine) but the files in the database location are the older MMapV1 style.
2018-06-01T01:28:21.196+0000 I CONTROL [initandlisten] build environment: 2018-06-01T01:28:21.196+0000 I CONTROL [initandlisten] distarch: x86_64 2018-06-01T01:28:21.196+0000 I CONTROL [initandlisten] target_arch: x86_64 2018-06-01T01:28:21.196+0000 I CONTROL [initandlisten] options: { command: [ "run" ], config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1,::1", ipv6: true, port: 27017, unixDomainSocket: { enabled: true, pathPrefix: "/var/run/mongodb" } }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid" }, storage: { dbPath: "/var/lib/mongodb", engine: "wiredTiger" }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/var/log/mongodb/mongod.log", verbosity: 0 } } 2018-06-01T01:28:21.216+0000 I STORAGE [initandlisten] exception in initAndListen: 28662 Cannot start server. Detected data files in /var/lib/mongodb created by the 'mmapv1' storage engine, but the specified storage engine was 'wiredTiger'., terminating 2018-06-01T01:28:21.216+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets... 2018-06-01T01:28:21.216+0000 I NETWORK [initandlisten] removing socket file: /var/run/mongodb/mongodb-27017.sock 2018-06-01T01:28:21.216+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog... 2018-06-01T01:28:21.216+0000 I CONTROL [initandlisten] now exiting 2018-06-01T01:28:21.216+0000 I CONTROL [initandlisten] shutting down with code:100
Not to worry, this is easy. Modify your MongoDB configuration file which is generally at /etc/mongod.conf and simply look for the section that specifies the engine to fire up. It'll say engine: wiredTiger. Just change it so that it looks like the below.
vi /etc/mongod.conf
# The storage engine for the mongod database (mmapv1|wiredTiger, wiredTiger by default # - works for 64 bit only) # Also possible to use unstable engines: devnull|ephemeralForTest engine: mmapv1
-
@scottalanmiller okay, they totally fucked this up.
-
@jaredbusch said in MongoDB Storage Engine Error Detected MMapV1 and wiredTiger:
@scottalanmiller okay, they totally fucked this up.
Yeah, this is some weird stuff.