[SERVER-59801] Setting FCV 3.4 in MongoDB 3.6 throws HMAC errors Created: 04/Sep/21  Updated: 05/Sep/21  Resolved: 05/Sep/21

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

Type: Bug Priority: Major - P3
Reporter: Vinicius Grippa Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Hi,

I believe I'm facing a bug. The procedure to trigger the issue is:

  • MongoDB 3.6(the minor version does not matter since I can reproduce in the latest 3.6.23 as well)
  • Set FCV to 3.4
  • Restart mongoS

My python dummy script:

import pymongo
myclient = pymongo.MongoClient("mongodb://user:password@localhost:37017,localhost:37018/test?authSource=admin&connectTimeoutMS=9000&readConcernLevel=majority&readPreference=secondaryPreferred&retryReads=true&minPoolSize=100&maxPoolSize=100&socketKeepAlive=true")
mydb = myclient["dbtest"]
mycol = mydb["colltest"]
 
#print(myclient);
 
doc={ 'a': 1,'b': 2}
 
#print(myclient.admin.command('currentOp'))
print(myclient.admin.command('ismaster'))
mycol.insert(doc);
{
    return foo;
}

Following the steps above, the following error is thrown:

$ python3 script.py
Traceback (most recent call last):
  File "script.py", line 11, in <module>
    print(myclient.admin.command('ismaster'))
  File "/usr/local/lib64/python3.6/site-packages/pymongo/database.py", line 733, in command
    codec_options, session=session, **kwargs)
  File "/usr/local/lib64/python3.6/site-packages/pymongo/database.py", line 630, in _command
    client=self.__client)
  File "/usr/local/lib64/python3.6/site-packages/pymongo/pool.py", line 613, in command
    user_fields=user_fields)
  File "/usr/local/lib64/python3.6/site-packages/pymongo/network.py", line 167, in command
    parse_write_concern_error=parse_write_concern_error)
  File "/usr/local/lib64/python3.6/site-packages/pymongo/helpers.py", line 159, in _check_command_response
    raise OperationFailure(msg % errmsg, code, response)
pymongo.errors.OperationFailure: Cache Reader No keys found for HMAC that is valid for time: { ts: Timestamp(1630774279, 1) } with id: 7004119824641032208

I noticed that only if I restart the entire cluster the problem goes away. Since the behavior is erratic, I believe this is a bug.



 Comments   
Comment by Dmitry Agranat [ 05/Sep/21 ]

Hi vgrippa@gmail.com,

MongoDB 3.6 reached EOL in April 2021 and the SERVER project is for bugs or feature suggestions for supported versions of the MongoDB server.

For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

Regards,
Dima

Comment by Vinicius Grippa [ 04/Sep/21 ]

I know this error in particular is not going to happen from MongoDB 4.0 onwards (since I can't use the FCV 3.4). But it would be important to confirm if downgrading the FCV can lead to problems if the cluster is not restarted.

If the restart is needed, then the documentation needs to be updated.

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