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

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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.6.2, 1.6.3
    • Component/s: None
    • None
    • ALL

      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

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

              Created:
              Updated:
              Resolved: