My MongoDB not working properly: WT_ERROR: non-specific WiredTiger error

My mongodb failed to start normally after I restarted the server, and prompted me that there was an error on something called wiredtiger. My project is built on PM2. I don’t know what is it and how to fix it. This project is very urgent, so I hope someone can help me fix this problem.

1|mongodb | 2022-01-31T14:44:47.416+0800 I - [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
1|mongodb | 2022-01-31T14:44:47.416+0800 I STORAGE [initandlisten]
1|mongodb | 2022-01-31T14:44:47.416+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
1|mongodb | 2022-01-31T14:44:47.416+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
1|mongodb | 2022-01-31T14:44:47.416+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3212M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),cache_cursors=false,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),
1|mongodb | 2022-01-31T14:44:47.929+0800 E STORAGE [initandlisten] WiredTiger error (-31802) [1643611487:929417][176701:0x7f29f063cf40], [file:WiredTiger.wt](file://wiredtiger.wt/), connection: unable to read root page from [file:WiredTiger.wt:](file://wiredtiger.wt:/) WT_ERROR: non-specific WiredTiger error
1|mongodb | 2022-01-31T14:44:47.929+0800 E STORAGE [initandlisten] WiredTiger error (0) [1643611487:929483][176701:0x7f29f063cf40], [file:WiredTiger.wt](file://wiredtiger.wt/), connection: WiredTiger has failed to open its metadata
1|mongodb | 2022-01-31T14:44:47.929+0800 E STORAGE [initandlisten] WiredTiger error (0) [1643611487:929491][176701:0x7f29f063cf40], [file:WiredTiger.wt](file://wiredtiger.wt/), connection: This may be due to the database files being encrypted, being from an older version or due to corruption on disk
1|mongodb | 2022-01-31T14:44:47.929+0800 E STORAGE [initandlisten] WiredTiger error (0) [1643611487:929498][176701:0x7f29f063cf40], [file:WiredTiger.wt](file://wiredtiger.wt/), connection: You should confirm that you have opened the database with the correct options including all encryption and compression options
1|mongodb | 2022-01-31T14:44:47.930+0800 E - [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 421
1|mongodb | 2022-01-31T14:44:47.930+0800 I STORAGE [initandlisten] exception in initAndListen: Location28595: -31802: WT_ERROR: non-specific WiredTiger error, terminating
1|mongodb | 2022-01-31T14:44:47.930+0800 I NETWORK [initandlisten] shutdown: going to close listening sockets...
1|mongodb | 2022-01-31T14:44:47.930+0800 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
1|mongodb | 2022-01-31T14:44:47.930+0800 I CONTROL [initandlisten] now exiting
1|mongodb | 2022-01-31T14:44:47.930+0800 I CONTROL [initandlisten] shutting down with code:100

I put the other important files about my WiredTiger in my website.

https://foj.ink/files/WT_ERROR.tar.gz

Hi @1111038 welcome to the community!

This is the standout message I see from the log you posted:

This means that there is a storage-level corruption in your deployment. What this message is saying is that it cannot properly read the file WiredTiger.wt which is a vital file.

There are various reasons why this can happen, one of them is the use of a suboptimal file system. Another is that it’s just bad luck that the disk is defective. Regarding filesystem, MongoDB recommends the use of XFS. This warning earlier in the logs says that XFS is not used:

Having said that, it may be possible that some data can still be salvaged. Please follow the instructions in this repair procedure and see if it helps. I would like to reiterate that it’s important that you backup your files before doing this attempt.

On another note, to ensure that you’re running MongoDB optimally, please follow the notes in the production notes.

Best regards
Kevin

1 Like

Hello, Kevin.

I tried your method, but it didn’t work. Running mongod command will still report the above error. So running the repair command may not save my data.

My data is very important to me, because this data stores a lot of programming topics related to our school, and I don’t have much energy to rewrite it. Can you help me see what other methods are available besides this solution?

Best wishes

Future_Maker

Hi @1111038

That is unfortunate. At this point, since it’s a hardware issue, there’s really not much to be done other than restoring from a known good backup into a new hardware (since the old one is apparently defective).

Alternatively you might be able to open a SERVER ticket describing the issue you’re having, and hopefully recover at least some of the data if it’s still possible to do so. However please note that the SERVER project is public, so any data you upload might be publically visible.

Best regards
Kevin

1 Like