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

mongod process stops when using --auth and the first connection fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 1.6.2, 1.6.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Problem:
      Following the examples for setting up authorization

      http://www.mongodb.org/display/DOCS/Security+and+Authentication

      I get the following in the logs after the mongod is started with the --auth parameter

      Wed Nov 10 17:19:17 [initandlisten] exception in initAndListen std::exception: unauthorized db:local lock type:1 client:0.0.0.0, terminating
      Wed Nov 10 17:19:17 dbexit:

      Wed Nov 10 17:19:17 [initandlisten] shutdown: going to close listening sockets...
      Wed Nov 10 17:19:17 [initandlisten] shutdown: going to flush oplog...
      Wed Nov 10 17:19:17 [initandlisten] shutdown: going to close sockets...
      Wed Nov 10 17:19:17 [initandlisten] shutdown: waiting for fs preallocator...
      Wed Nov 10 17:19:17 [initandlisten] shutdown: closing all files...
      Wed Nov 10 17:19:17 closeAllFiles() finished

      Wed Nov 10 17:19:17 [initandlisten] shutdown: removing fs lock...
      Wed Nov 10 17:19:17 dbexit: really exiting now

      Reproduce:
      0. Setup two member replica set
      1. Start mongod without --auth
      2. Log on
      3. Run the following commands in the mongo shell
      > use admin
      > db.addUser("theadmin", "anadminpassword")
      > db.auth("theadmin", "anadminpassword")
      > db.shutdownServer()
      4. Restart mongod with the --auth parameter
      5. Log on with localhost:27017/admin -u theadmin -p anadminpassword
      6. Get the error message in the logs

      Business Case:

      • usability
        Customer wants to secure their DB's, a failure to authenticate appears to stop the mongod

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              alvin Alvin Richards (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: