Failure Phenomenon
MongoDB After the restart, waited for several 10 minutes still did not start completion, single node replica set, the state has been in startup reason analysis
View Mongod error log, found to have been in building index, but according to previous experience, only in the Redo secondary node will often be in the building index state, and this DB is the primary node, So I looked at all the information about this building index.
2017-01-05t17:24:59.473+0800 [Indexrebuilder] found 1 index (es) that wasn ' t finished before
2017-01-05t17:24:59.473+0800 [Indexrebuilder] found 1 interrupted index build (s) on ASO.APP_VERSION_INFO_CHN1
2017-01-05t17:24:59.473+0800 [Indexrebuilder] Note:restart the server with--noindexbuildretry to skip index rebuilds
2017-01-05t17:24:59.473+0800 [Indexrebuilder] going to rebuild: {v:1, unique:true, key: {_fts: "text", _ftsx:1}, Nam E: "$**_text", ns: "Aso.app_version_info_chn1", Weights: {$**: 1}, Default_language: "中文版", Language_override: "Lang Uage ", Textindexversion:2}
2017-01-05t17:24:59.474+0800 [Indexrebuilder] Build Index ON:ASO.APP_VERSION_INFO_CHN1 properties: {v:1, unique:true, Key: {_fts: "text", _ftsx:1}, Name: "$**_text", ns: "Aso.app_version_info_chn1", Weights: {$**: 1}, Default_language : "中文版", Language_override: "Language", Textindexversion:2}
2017-01-05t17:24:59.474+0800 [Indexrebuilder] Building index using bulk method
According to the error log prompts, it seems that the reason is: before the DB shutdown, there are one or two large indexes to establish the operation is not completed, DB directly shutdown, and so on when the DB starts again, MONGO the index will be rebuilt by default, the rebuild period is in the startup state Processing Methods
Because it is not clear how long the building index will last, according to the error log prompts, restart Mongod with the--noindexbuildretry parameter to skip the index rebuild. After the startup is completed, evaluate whether the index should be established.