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

rs.initiate() needed before db.createUser() using localhost exception if node is fresh replset node

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual
    • Labels:
      None
    • # Replies:
      3
    • Last comment by Customer:
      true
    • Story Points:
      0.5
    • Sprint:
      KANBAN BUCKET

      Description

      The "Add Users After Enabling Access Control" section of /manual/tutorial/enable-authentication/ describes how to create the first user after creating a new node that has auth enabled.

      I think the list of steps should include a new one between the current steps 2 and 3, pointing out if the node has the replSet arg (i.e. it is the first node of new replica set being created) that rs.initiate() will need to be run as the first step, before db.createUser(). If it isn't then no writes will be permitted (the node is not yet a primary), so the db.createUser() command will be refused for that reason.

      Without that caveat users may think the error they see when they run db.createUser() is something they did wrong in regards to options they set or how well they followed our instructions.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 51 weeks, 1 day ago
                Date of 1st Reply: