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

Authentication & replication = exit on startup

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.3.5
    • Affects Version/s: 1.3.3, 1.3.4
    • Component/s: None
    • None
    • Environment:
      Mon Mar 22 20:14:43 sys info: Linux promethium 2.6.24-27-xen #1 SMP Thu Jan 28 01:08:07 UTC 2010 x86_64 BOOST_LIB_VERSION=1_38

      0. Completely clean data dir
      1. Start mongo WITHOUT auth
      2. Add admin & a local user: use local; db.addUser('repl', 'test')
      3. Re-start mongod with --auth and --master, and get the following:

      Mon Mar 22 20:14:43 Mongo DB : starting : pid = 14111 port = 27017 dbpath = /var/lib/mongodb master = 1 slave = 0 64-bit
      Mon Mar 22 20:14:43 db version v1.3.4, pdfile version 4.5
      Mon Mar 22 20:14:43 git version: nogitversion
      Mon Mar 22 20:14:43 sys info: Linux promethium 2.6.24-27-xen #1 SMP Thu Jan 28 01:08:07 UTC 2010 x86_64 BOOST_LIB_VERSION=1_38
      Mon Mar 22 20:14:43 waiting for connections on port 27017
      Mon Mar 22 20:14:43 Assertion: 10057:unauthorized for db [local] lock type: 1

      0x4d8ef1 0x5b404c 0x5b55d6 0x58bdbb 0x58c6e6 0x550484 0x61b0d5 0x61deac 0x61e438 0x62188e 0x7fa3dba34abd 0x48ed29
      /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x241) [0x4d8ef1]
      /usr/bin/mongod(_ZN5mongo6Client7Context5_authEi+0x27c) [0x5b404c]
      /usr/bin/mongod(_ZN5mongo6Client7Context11_finishInitEb+0x186) [0x5b55d6]
      /usr/bin/mongod [0x58bdbb]
      /usr/bin/mongod(_ZN5mongo7Helpers12getSingletonEPKcRNS_7BSONObjE+0x66) [0x58c6e6]
      /usr/bin/mongod(_ZN5mongo16startReplicationEv+0x84) [0x550484]
      /usr/bin/mongod(_ZN5mongo6listenEi+0x125) [0x61b0d5]
      /usr/bin/mongod(_ZN5mongo14_initAndListenEiPKc+0x5ec) [0x61deac]
      /usr/bin/mongod(_ZN5mongo13initAndListenEiPKc+0x18) [0x61e438]
      /usr/bin/mongod(main+0x32de) [0x62188e]
      /lib/libc.so.6(__libc_start_main+0xfd) [0x7fa3dba34abd]
      /usr/bin/mongod [0x48ed29]
      Mon Mar 22 20:14:43 exception in initAndListen std::exception: unauthorized for db [local] lock type: 1
      , terminating
      Mon Mar 22 20:14:43 dbexit:
      Mon Mar 22 20:14:43 shutdown: going to close listening sockets...
      Mon Mar 22 20:14:43 shutdown: going to flush oplog...
      Mon Mar 22 20:14:43 shutdown: going to close sockets...
      Mon Mar 22 20:14:43 shutdown: waiting for fs preallocator...
      Mon Mar 22 20:14:43 shutdown: closing all files...
      Mon Mar 22 20:14:43 closeAllFiles() finished
      Mon Mar 22 20:14:43 shutdown: removing fs lock...
      Mon Mar 22 20:14:43 dbexit: really exiting now

      Starting without --auth is fine.

            Assignee:
            aaron Aaron Staple
            Reporter:
            goosmurf Yun Huang Yong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: