[SERVER-2089] mongod process stops when using --auth and the first connection fails Created: 11/Nov/10  Updated: 11/Nov/10  Resolved: 11/Nov/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.6.2, 1.6.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-1469 replica sets should use global privat... Closed
Operating System: ALL
Participants:

 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


 Comments   
Comment by Eliot Horowitz (Inactive) [ 11/Nov/10 ]

replica sets don't support --auth

see: SERVER-1469

Generated at Thu Feb 08 02:58:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.