Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11146

"Change the Size of the Oplog" does not explicitly call out that auth must be disabled

      https://docs.mongodb.com/manual/tutorial/change-oplog-size/#restart-a-secondary-in-standalone-mode-on-a-different-port

      >Restart this mongod as a standalone instance running on a different port and without the --replSet parameter.

      We call out that the mongod must be restarted without the -replSet parameter but we do not explicitly say to omit the auth parameter. If the -auth parameter is present, the user will get the following error message:

      MongoDB Enterprise > use local
      switched to db local
      MongoDB Enterprise > db.runCommand( { create: "oplog.rs", capped: true, size: (150 * 1024 * 1024 * 1024) } )
      {
      "ok" : 0,
      "errmsg" : "not authorized on local to execute command { create: "oplog.rs", capped: true, size: 161061273600.0 }",
      "code" : 13,
      "codeName" : "Unauthorized"
      }
      

      The mongod standalone must be started with both the -replSet and -auth parameters removed or the user must have the _system privilege temporarily added in order to run the oplog create command in this step. (I would personally discourage adding the _system privilege as it is a dangerous privilege and its removal from the user is easily forgotten.)

            Assignee:
            ravind.kumar Ravind Kumar (Inactive)
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              1 year, 27 weeks, 2 days ago