Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Done
-
None
-
None
-
None
-
None
-
ALL
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.