Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59801

Setting FCV 3.4 in MongoDB 3.6 throws HMAC errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vgrippa@gmail.com VINICIUS GRIPPA
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: