Failed to start mongo.service after update from 4.0 to 4.2

Hello,

I’m trying to update my MongoDB installation from 3.6 to the latest version [4.4] on Ubuntu16.04 using apt-get. Going from 4.0 to 4.2 I faced a problem during the startup process after updating the binaries and mongo.log shows the exception below:

2020-08-07T14:58:26.205+0300 I  STORAGE  [initandlisten] exception in initAndListen: Location40415: BSON field 'MinValidDocument.oplogDeleteFromPoint' is an unknown field., terminating 

I’m using WiredTiger and I checked the feature compatibility version and other prerequisites according to the installation and the compatibility docs and everything looks fine. I don’t have any clue on what could be the source of this problem and I’d be grateful if someone can help.

Hi @Anas_Obeidat,

Can you start this instance in standalone mode (different port and no replication settings in config) and provide the following content when logged in as admin:

use local
db.replset.minvalid.find({}).pretty ();

For some reason I believe this document is malformed.

The field oplogDeleteFromPoint should not be there when the FCV is moved to 4.2 according to SERVER-30556

Best
Pavel

Thanks for your response @Pavel_Duchovny,

I forgot to mention that but I’m experimenting on a standalone instance. I guess that’s not possible because the server won’t start after the upgrade so, I downgraded mongo to 4.0.19 and started it and connected via mongoshell and this is the output:

> use local
switched to db local
> db.replset.minvalid.find({}).pretty ();
{
	"_id" : ObjectId("57b18fb43040dc07cefc3235"),
	"ts" : Timestamp(1505648110, 6),
	"t" : NumberLong(-1),
	"oplogDeleteFromPoint" : Timestamp(0, 0)
}

What do you suggest in this case? do you think modifying this document manually before the upgrade would be a wise move?

Hi @Anas_Obeidat,

Does it fail when switching the feature comparability to 4.2 or just when using a 4.2 binary?

Consider backing up the dbPath before doing the following removal.

I believe the way to go is to $unset this field on a Primary.

db.replset.minvalid.update(
 { "_id" : ObjectId("57b18fb43040dc07cefc3235")},
   { $unset: { oplogDeleteFromPoint: ""} }
);

Verify it is replicated to all secondaries.

Best regards
Pavel

1 Like

Thanks, @Pavel_Duchovny!

I ran your query before the upgrade and it solved my problem.

For clarification, the problem appeared after updating the binaries to version 4.2. When I start the mongo service, the service fails to start and the log shows this exception before it starts the shutdown procedure:

2020-08-07T14:58:26.205+0300 I  STORAGE  [initandlisten] exception in initAndListen: Location40415: BSON field 'MinValidDocument.oplogDeleteFromPoint' is an unknown field., terminating 

The solution was to unset the oplogDeleteFromPoint like @Pavel_Duchovny advised. After that I updated the binaries and and the service started normally.

Thanks,
Anas

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.