mongod crashes when running with --auth and a mongo shell connecting without -u & -p

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.4.0
    • Component/s: Stability
    • None
    • Environment:
      FreeBSD 7.2-RELEASE-p5, mongod running inside a Jail. FreeBSD Jails have no localhost so mongod is specifically bound to the Jails external IP. Shared Memory is enabled.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I installed mongodb via the FreeBSD ports and added an admin user as described on the website. I added these three lines to /usr/local/etc/mongo.conf:

      dbpath = /var/db/mongodb
      bind_ip = xx.xx.xxx.xxx
      auth = true

      Then started it via: ./usr/local/etc/rc.d/mongod start

      Everything went fine whenn I connected via the mongo shell supplying proper -u and -p parameters. However if I start mongo without any parameters mongod crashes after the first query. This is the log of exactly one such session. Starting mongod, connecting, first query, boom:

      Mon Apr 5 22:30:19 Mongo DB : starting : pid = 86330 port = 27017 dbpath = /var/db/mongodb master = 0 slave = 0 32-bit

      Mon Apr 5 22:30:19 db version v1.4.0, pdfile version 4.5
      Mon Apr 5 22:30:19 git version: nogitversion
      Mon Apr 5 22:30:19 sys info: FreeBSD xxxxxxxx 7.2-RELEASE-p5 FreeBSD 7.2-RELEASE-p5 #0: Wed Dec 9 21:41:28 CET 2009 i386 BOOST_LIB_VERSION=1_41
      Mon Apr 5 22:30:19 waiting for connections on port 27017
      Mon Apr 5 22:30:19 web admin interface listening on port 28017
      Mon Apr 5 22:30:27 connection accepted from xxxxxxxxxxxxx:61762 #1
      Mon Apr 5 22:30:30 Assertion: 10057:unauthorized for db [test] lock type: -1

      Mon Apr 5 22:30:30 Got signal: 6 (Abort trap: 6).
      Mon Apr 5 22:30:30 Backtrace:
      Mon Apr 5 22:30:30 dbexit:
      Mon Apr 5 22:30:30 shutdown: going to close listening sockets...
      Mon Apr 5 22:30:30 going to close listening socket: 5
      Mon Apr 5 22:30:30 going to close listening socket: 7
      Mon Apr 5 22:30:30 shutdown: going to flush oplog...
      Mon Apr 5 22:30:30 shutdown: going to close sockets...
      Mon Apr 5 22:30:30 shutdown: waiting for fs preallocator...
      Mon Apr 5 22:30:30 shutdown: closing all files...
      Mon Apr 5 22:30:30 closeAllFiles() finished
      Mon Apr 5 22:30:30 shutdown: removing fs lock...
      Mon Apr 5 22:30:30 dbexit: really exiting now

      I will try that on a FreeBSD 8.0 Jail today and update the ticket accordingly.

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            John-Paul Bader
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: