Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2357

migration to keyfile authentication fails

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.3.5
    • Component/s: None
    • Labels:
    • Environment:
      Mongoose version: 5.7.13

      I am following this guide to migrate my replica-set to keyfile authentication.

      https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set-without-downtime/

      Everything works fine till 8th step that is stepping down primary and restart with keyFile specified and transitionToAuth option.

       

      When I try to restart secondary without "transitionToAuth" option, all clients connected to replicaSet crashes with following error.

       

      
      MongoError: Cache Reader No keys found for HMAC that is valid for time: { ts: Timestamp(1575278918, 7) } with id: 0
          at Connection.<anonymous> (/gumlet/node_modules/mongodb/lib/core/connection/pool.js:460:61)
          at Connection.emit (events.js:210:5)
          at Connection.EventEmitter.emit (domain.js:475:20)
          at processMessage (/gumlet/node_modules/mongodb/lib/core/connection/connection.js:368:10)
          at Socket.<anonymous> (/gumlet/node_modules/mongodb/lib/core/connection/connection.js:537:15)
          at Socket.emit (events.js:210:5)
          at Socket.EventEmitter.emit (domain.js:475:20)
          at addChunk (_stream_readable.js:309:12)
          at readableAddChunk (_stream_readable.js:290:11)
          at Socket.Readable.push (_stream_readable.js:224:10)
          at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
        operationTime: Timestamp { _bsontype: 'Timestamp', low_: 4, high_: 1575278918 },
        ok: 0,
        errmsg: 'Cache Reader No keys found for HMAC that is valid for time: { ts: Timestamp(1575278918, 7) } with id: 0',
        code: 211,
        codeName: 'KeyNotFound',
        '$clusterTime': {
          clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 6, high_: 1575278918 },
          signature: { hash: [Binary], keyId: [Long] }
        },
        name: 'MongoError',
        [Symbol(mongoErrorContextSymbol)]: {}
      }
      

       

       

       

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            aditya@patadia.org Aditya Patadia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: