HiveBrain v1.2.0
Get Started
← Back to all entries
debugModerate

Unable to start mongodb as a service - Exception; Collection does not have UUID in KVCatalog

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
exceptionkvcatalogmongodbunablecollectionservicedoesstartuuidnot

Problem

I have installed Mongodb 4.2

and when running

sudo service mongod start|restart

It does not start the server and I have the log below in mongod.log file.

Exception in initAndListen: MustDowngrade: Collection does not have UUID in KVCatalog. Collection: local.startup_log, terminating

Here is more detail:

```
CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
CONTROL [initandlisten] MongoDB starting : pid=7434 port=27017 dbpath=/var/lib/mongodb 64-bit host=vm2851358555.bitcommand.com
CONTROL [initandlisten] db version v4.2.0
CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.0k 28 May 2019
CONTROL [initandlisten] allocator: tcmalloc
CONTROL [initandlisten] modules: none
CONTROL [initandlisten] build environment:
CONTROL [initandlisten] distmod: debian92
CONTROL [initandlisten] distarch: x86_64
CONTROL [initandlisten] target_arch: x86_64
CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
STORAGE [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
STORAGE [initandlisten]
STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive

Solution

The problem can be solved by:

  • Backing-up all the databases (using mongodump)



  • Removing every file in /data/db, due to their incompatibility with


the newer version: rm -rf /data/db/*

  • Restarting the MongoDB service



  • Restoring all the databases (using mongorestore)

Context

StackExchange Database Administrators Q#246862, answer score: 13

Revisions (0)

No revisions yet.