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

mongod --replSet --repair fails with NotMasterNoSlaveOk error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: 4.0.19, 4.2.8, 4.4.0
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2021-08-09, Execution Team 2021-08-23

      Create a 3-node replica set, shut it down, then restart with --repair. The repair does not complete, failing part way through with the following error:

      {"t":\{"$date":"2020-08-08T08:02:45.266-04:00"},"s":"E", "c":"STORAGE", "id":20557, "ctx":"initandlisten","msg":"DBException in initAndListen, terminating","attr":\{"error":"NotMasterNoSlaveOk: not master and slaveOk=false"}}
      

      This happens on all 3 nodes. Debug level 5 logs attached.

        1. r0.log
          310 kB
        2. r1.log
          310 kB
        3. r2.log
          310 kB

            Assignee:
            jackson.xie@mongodb.com Jackson Xie (Inactive)
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: