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

shutdown command fails on single node replica set for timeoutSecs >= 120

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication
    • ALL

      Running shutdownServer on a single node replica as follows fails:

      $ mongo  --eval 'db.setLogLevel(1, "replication");db.getSiblingDB("admin").shutdownServer({"force": true, "timeoutSecs": 121})' ; echo "status = $?"
      MongoDB shell version v3.7.0-472-g11225541cb
      connecting to: mongodb://127.0.0.1:27017
      MongoDB server version: 3.7.0-472-g11225541cb
      2018-01-12T16:32:52.267+0000 E QUERY    [thread1] Error: shutdownServer failed: {
              "ok" : 0,
              "errmsg" : "By the time we were ready to step down, we were already past the time we were supposed to step down until",
              "code" : 50,
              "codeName" : "ExceededTimeLimit",
              "operationTime" : Timestamp(1515774634, 5),
              "$clusterTime" : {
                      "clusterTime" : Timestamp(1515774634, 5),
                      "signature" : {
                              "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                              "keyId" : NumberLong(0)
                      }
              }
      } :
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      DB.prototype.shutdownServer@src/mongo/shell/db.js:453:1
      @(shell eval):1:34
      status = 252
      

      Running shutdownServer with any value less than this will succeed:

      
      $ mongo  --eval 'db.setLogLevel(1, "replication");db.getSiblingDB("admin").shutdownServer({"force": true, "timeoutSecs": 119})' ; echo "status = $?"
      MongoDB shell version v3.7.0-472-g11225541cb
      connecting to: mongodb://127.0.0.1:27017
      MongoDB server version: 3.7.0-472-g11225541cb
      server should be down...
      status = 0
      

      The same behavior manifest on 3.4 / 3.6.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            jim.oleary@mongodb.com James O'Leary
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: