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

Incorrect error on db.shutDownServer() of 1 member replica set

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.0
    • Affects Version/s: 3.0.0
    • Component/s: Replication
    • Labels:
    • Fully Compatible
    • ALL

      Running db.shutdownServer() against a one member replica set fails with an error of "No electable secondaries caught up as of" with a timestamp. This makes no sense for a one member replica set.

      We should either

      1. Allow this command to execute without error.
      2. Require {force: true} (as we do now) but provide a user-friendly message when run without and an example of the command to run.
        > use admin
        > db.shutdownServer()
        2015-03-06T16:21:44.474-0500 I NETWORK  trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
        2015-03-06T16:21:44.475-0500 I NETWORK  reconnect 127.0.0.1:27017 (127.0.0.1) ok
        assert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500
        Error: assert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500
            at Error (<anonymous>)
            at doassert (src/mongo/shell/assert.js:11:14)
            at assert (src/mongo/shell/assert.js:20:5)
            at DB.shutdownServer (src/mongo/shell/db.js:212:9)
            at (shell):1:4
        2015-03-06T16:21:44.476-0500 E QUERY    Error: assert failed : unexpected error: Error: shutdownServer failed: No electable secondaries caught up as of 2015-03-06T16:21:44.475-0500
            at Error (<anonymous>)
            at doassert (src/mongo/shell/assert.js:11:14)
            at assert (src/mongo/shell/assert.js:20:5)
            at DB.shutdownServer (src/mongo/shell/db.js:212:9)
            at (shell):1:4 at src/mongo/shell/assert.js:13
        

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: