MongoDB and WiredTiger compatibility issue

9/30/2020

Today, my MongoDB container running on Google Kubernetes Engine suddently stopped working, and this is the generated log:

2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=mongo-db-0
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] db version v3.6.20
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] git version: 39c200878284912f19553901a6fea4b31531a899
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] allocator: tcmalloc
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] modules: none
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] build environment:
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] distmod: ubuntu1604
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] distarch: x86_64
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] target_arch: x86_64
2020-09-30T07:01:42.782+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true } }
2020-09-30T07:01:42.782+0000 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2020-09-30T07:01:42.783+0000 I STORAGE [initandlisten]
2020-09-30T07:01:42.783+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2020-09-30T07:01:42.783+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
2020-09-30T07:01:42.783+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=334M,cache_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2020-09-30T07:01:43.433+0000 E STORAGE [initandlisten] WiredTiger error (95) [1601449303:433554][1:0x7f9f6c49da40], wiredtiger_open: __wt_conn_compat_config, 226: Version incompatibility detected: required max of 3.0cannot be larger than saved release 3.3: Operation not supported Raw: [1601449303:433554][1:0x7f9f6c49da40], wiredtiger_open: __wt_conn_compat_config, 226: Version incompatibility detected: required max of 3.0cannot be larger than saved release 3.3: Operation not supported
2020-09-30T07:01:43.434+0000 E - [initandlisten] Assertion: 28595:95: Operation not supported src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 488
2020-09-30T07:01:43.434+0000 I STORAGE [initandlisten] exception in initAndListen: Location28595: 95: Operation not supported, terminating
2020-09-30T07:01:43.434+0000 F - [initandlisten] Invariant failure globalStorageEngine src/mongo/db/service_context_d.cpp 272
2020-09-30T07:01:43.435+0000 F - [initandlisten]

I tested older Mongo container versions but it didn't work. I had this problem in the past, and I was able to fix it by completly wiping the persistent storage, but unfortunatelly this time I cannot do this.

How do I solve this compatibility issue without wiping the storage data?

-- Hugo Sartori
google-kubernetes-engine
kubernetes
mongodb
wiredtiger

1 Answer

9/30/2020

A stored WiredTiger version of 3.3 means the data files were written by a MongoDB version from 4.2.6 to 4.2.8.

One of those versions should be able to open those files.

-- Joe
Source: StackOverflow