[SERVER-35183] Starup the mongodb service failed after setup a slave node on the same server with the same port Created: 23/May/18  Updated: 25/Nov/18  Resolved: 25/Oct/18

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

Type: Question Priority: Major - P3
Reporter: ky Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows server 2012 datacenter


Participants:

 Description   

I can't startup the mongodb process as a windows service after setup a slave node on the same server with the same port 27017.I had recieved an error code 1067 by the windows warnning.And I check the mongo log files, I get the main error message below:

2018-05-23T21:00:53.432+0800 E STORAGE  [initandlisten] WiredTiger error (0) [1527080453:431738][3136:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: read checksum error for 4096B block at offset 34094784512: block header checksum of 630942458 doesn't match expected checksum of 2298237107
2018-05-23T21:00:53.432+0800 E STORAGE  [initandlisten] WiredTiger error (0) [1527080453:431738][3136:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: collection-2-6275901123418866083.wt: encountered an illegal file format or internal value
2018-05-23T21:00:53.432+0800 E STORAGE  [initandlisten] WiredTiger error (-31804) [1527080453:431738][3136:8781149835856], file:collection-2-6275901123418866083.wt, WT_CURSOR.insert: the process must exit and restart: WT_PANIC: WiredTiger library panic

I had tried to run the --repair command to solved the problem, but still occur an error. Here is the error message after run the --repair command:

2018-05-23T20:22:39.573+0800 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory C:\data\db\ not found., terminating
2018-05-23T20:22:39.574+0800 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
2018-05-23T20:22:39.575+0800 I NETWORK  [initandlisten] shutdown: going to flush diaglog...
2018-05-23T20:22:39.575+0800 I CONTROL  [initandlisten] now exiting
2018-05-23T20:22:39.576+0800 I CONTROL  [initandlisten] shutting down with code:100

 

The windows service run with the command list below:

"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --dbpath D:\mongodb\db --logpath D:\mongodb\log\mongodb.log --port 27017 --master --auth --service

And the slave node setup command list below, the source ip in the command point to the same server

C:\"Program Files"\MongoDB\Server\3.4\bin\mongod.exe  --dbpath D:\data\db --logpath D:\MongoDB\mongodb.log --port 27017 --slave --source 10.53.200.83:27017 --service 

 

After search few similar issue on the internet, I still not found the solution how to repair it.Plz help, thx a lot.

 
 
 

 

 



 Comments   
Comment by Kelsey Schubert [ 19/Jun/18 ]

Hi ky,

Thanks for reporting this issue, and sorry for the delay getting back to you. Unfortunately, in this case, it appears that a collection file has become corrupted on disk. It's not clear from the description how this corruption occurred. If you have the logs from both nodes covering the time where they were brought up concurrently on the same port, it may help us better understand the situation that led to the corruption observed. Would you please upload these files to the ticket, so we can investigate?

Thank you,
Kelsey

Comment by ky [ 28/May/18 ]

Hello guys!

Now I have ensured that this error caused by the server abnormal shutdown,I will attach corresponding files to fix it if you want.Any help would be greatly appreciated!

Generated at Thu Feb 08 04:39:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.