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

Arbiter replies "No keys found for HMAC that is valid for time" to isMaster with clusterTime

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication, Sharding
    • Labels:
      None

      I was trying to update the C Driver to update its clusterTime from replica set members' isMaster replies and send those new clusterTimes to other members in its isMaster requests. In my old code, the C Driver would initially discover the replica set by calling isMaster on all members, but ignore the clusterTimes it received in the server replies.

      Now, I'm updating the client's clusterTime with the latest clusterTime seen in any isMaster reply as they are received, and I send that latest clusterTime with the next isMaster request to any member.

      After this change, sending isMaster with a clusterTime to an arbiter causes:

      { "isMaster" : 1, "client" : { "driver" : { "name" : "mongoc", "version" : "1.10.0-dev" }, "os" : { "type" : "Darwin", "name" : "macOS", "version" : "17.4.0", "architecture" : "x86_64" }, "platform" : "cfg=0xde8265 posix=200112 stdc=201112 CC=clang 9.0.0 (clang-900.0.39.2) CFLAGS=\"-DBSON_MEMCHECK\" LDFLAGS=\"\"" }, "compression" : [  ], "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "signature" : { "hash" : { "$binary" : { "base64": "mPi0HEcgHcDV49pG4rvOLU14yO4=", "subType" : "00" } }, "keyId" : 6533633155528654849 } } }
      

      Here's the isMaster sent to the arbiter:

      { "operationTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "ok" : 0.0, "errmsg" : "Cache Reader No keys found for HMAC that is valid for time: { ts: Timestamp(1521233526, 1) } with id: 6533633155528654849", "code" : 211, "codeName" : "KeyNotFound", "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1521233526, "i" : 1 } }, "signature" : { "hash" : { "$binary" : { "base64": "AAAAAAAAAAAAAAAAAAAAAAAAAAA=", "subType" : "00" } }, "keyId" : 0 } } }
      

      The replica set was started with auth; however, the driver never attempts to authenticate to the arbiter.

      Server version 3.7.0-1275-g96e775a44f.

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: