[SERVER-58319] Mongodb error on start. Mongo server not reachable error. Created: 07/Jul/21  Updated: 09/Aug/21  Resolved: 09/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.2.16
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Humayun Ahmad Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-58326 Mongodb Error on start : file:WiredTi... Closed
duplicates SERVER-58330 Mongodb Error on start : file:WiredTi... Closed
Participants:

 Description   

Hello everyone,

I am facing an issue regarding mongodb startup connection. Mongodb logs out error of the following nature whenever I try the command, error logs out to mongodb.logs file:

sudo service mongod start
 
2021-07-07T18:02:39.398+0500 I CONTROL  [main] ***** SERVER RESTARTED *****
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] MongoDB starting : pid=21255 port=27017 dbpath=/edx/var/mongo/mongodb 64-bit host=LMS
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] db version v3.2.16
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] git version: 056bf45128114e44c5358c7a8776fb582363e094
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] allocator: tcmalloc
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] modules: none
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] build environment:
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten]     distmod: ubuntu1604
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten]     distarch: x86_64
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten]     target_arch: x86_64
2021-07-07T18:02:39.423+0500 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, replication: { replSetName: "rs0" }, security: { authorization: "enabled", keyFile: "/etc/mongodb_key" }, storage: { dbPath: "/edx/var/mongo/mongodb", engine: "wiredTiger", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, logRotate: "reopen", path: "/edx/var/log/mongo/mongodb.log", quiet: true } }
2021-07-07T18:02:39.449+0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=8G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2021-07-07T18:02:39.461+0500 E STORAGE  [initandlisten] WiredTiger (-31802) [1625662959:461240][21255:0x7f2ecc1bdc80], file:WiredTiger.wt, connection: unable to read root page from file:WiredTiger.wt: WT_ERROR: non-specific WiredTiger error
2021-07-07T18:02:39.461+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625662959:461332][21255:0x7f2ecc1bdc80], file:WiredTiger.wt, connection: WiredTiger has failed to open its metadata
2021-07-07T18:02:39.461+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625662959:461363][21255:0x7f2ecc1bdc80], 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
2021-07-07T18:02:39.461+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625662959:461389][21255:0x7f2ecc1bdc80], file:WiredTiger.wt, connection: You should confirm that you have opened the database with the correct options including all encryption and compression options
2021-07-07T18:02:39.462+0500 I -        [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error
2021-07-07T18:02:39.462+0500 I STORAGE  [initandlisten] exception in initAndListen: 28595 -31802: WT_ERROR: non-specific WiredTiger error, terminating
2021-07-07T18:02:39.462+0500 I CONTROL  [initandlisten] dbexit:  rc: 100

 

I am using Mongodb version 3.2.16. I have also tried to repair my database using the following commands and it also shows the same errors: 

 

sudo mongod --dbpath /edx/var/mongo/mongodb --repair
 
sysadmin@LMS:~$ sudo mongod --dbpath /edx/var/mongo/mongodb --repair
2021-07-07T18:33:45.503+0500 I CONTROL  [initandlisten] MongoDB starting : pid=20396 port=27017 dbpath=/edx/var/mongo/mongodb 64-bit host=LMS
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] db version v3.2.16
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] git version: 056bf45128114e44c5358c7a8776fb582363e094
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] allocator: tcmalloc
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] modules: none
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] build environment:
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten]     distmod: ubuntu1604
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten]     distarch: x86_64
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten]     target_arch: x86_64
2021-07-07T18:33:45.507+0500 I CONTROL  [initandlisten] options: { repair: true, storage: { dbPath: "/edx/var/mongo/mongodb" } }
2021-07-07T18:33:45.539+0500 I -        [initandlisten] Detected data files in /edx/var/mongo/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2021-07-07T18:33:45.539+0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=8G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),,log=(enabled=false),
2021-07-07T18:33:45.678+0500 E STORAGE  [initandlisten] WiredTiger (-31802) [1625664825:678256][20396:0x7fa39d3b3c80], file:WiredTiger.wt, connection: unable to read root page from file:WiredTiger.wt: WT_ERROR: non-specific WiredTiger error
2021-07-07T18:33:45.678+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625664825:678324][20396:0x7fa39d3b3c80], file:WiredTiger.wt, connection: WiredTiger has failed to open its metadata
2021-07-07T18:33:45.678+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625664825:678338][20396:0x7fa39d3b3c80], 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
2021-07-07T18:33:45.678+0500 E STORAGE  [initandlisten] WiredTiger (0) [1625664825:678349][20396:0x7fa39d3b3c80], file:WiredTiger.wt, connection: You should confirm that you have opened the database with the correct options including all encryption and compression options
2021-07-07T18:33:45.680+0500 I -        [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error
2021-07-07T18:33:45.680+0500 I STORAGE  [initandlisten] exception in initAndListen: 28595 -31802: WT_ERROR: non-specific WiredTiger error, terminating
2021-07-07T18:33:45.680+0500 I CONTROL  [initandlisten] dbexit:  rc: 100
 
 
 
 
 
 

It'd be a great help if anyone can guide me to the solution.

Thankyou.  

 



 Comments   
Comment by Eric Sedor [ 15/Jul/21 ]

MongoDB 3.2 reached end of life in September 2018. The current earliest version we support is 4.0.

But we can provide limited guidance on this issue. The ideal resolution is to perform a clean resync from an unaffected node.

If that's not an option, make a complete copy of the database's $dbpath directory to safeguard so that you can work off of the current $dbpath. Then, try mongod --repair using the latest version of MongoDB.

Eric

Generated at Thu Feb 08 05:44:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.