Cache Reader No Keys found for HMAC that is valid for time

We have set up Mongo DB replica and in the app server we are getting following logs , due to which mongo Db record saving operation seems failing
Cache Reader No Keys found for HMAC that is valid for time

Please help us to provide solution to fix this issue

Any one who faced this issue earlier, pls advise solution to fix this issue

Hi @prashant_sinha welcome to the community!

What’s your MongoDB version, and what’s the replica set topology? I believe a similar-looking issue was fixed in SERVER-40535. If you’re not using the latest version in the MongoDB series you’re using (4.2.23. 4.4.17, 5.0.13, or 6.0.2), please try to upgrade and see if the issue persists.

If you’re not using one of the supported series (e.g. 3.6 or older), then I would suggest to upgrade to a supported version, since unsupported versions will not get any more updates/fixes.

Best regards
Kevin

Hi @kevinadi
Mongo DB version is 4.2.18 . Is it required to be upgraded to resolve this issue

Regards
Prashant

Hi @prashant_sinha

It’s recommended to upgrade to the newest version in the series you’re using regardless.

If you’re still seeing this issue after upgrading to 4.2.23 then we’ll know for sure that the issue you’re seeing is new and not the same one fixed in the SERVER ticket, even though superficially it looks similar.

Best regards
Kevin

Similar error I am getting for mongodb 6.0.14 version -

2024-06-03T13:48:18.519+0200 skipping applying the config.$cmd namespace in applyOps
2024-06-03T13:48:18.520+0200 skipping applying the config.$cmd namespace in applyOps

|2024-06-03T13:48:18.529+0200|Failed: restore error: error applying oplog: applyOps: (KeyNotFound) No keys found for HMAC that is valid for time: { ts: Timestamp(1717415298, 5) } with id: 0|

|2024-06-03T13:48:18.529+0200|0 document(s) restored successfully. 0 document(s) failed to restore.|

I can share the bson dump as well if required to debug the issue, I do not see this issue being fixed, is there any thing which can be done currently to fix this.