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

Shell exception when printing startup warnings with auth enabled.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.4.0-rc0
    • 2.3.2
    • Shell
    • ALL
    • Hide

      Start a mongod with auth.

      ./mongod --auth

      Start a shell, connected to that mongod.

      ./mongo

      Expected behavior, unspecified.

      Actual behavior:

      $ ./mongo
      MongoDB shell version: 2.3.2-pre-
      connecting to: test
      Wed Jan  2 13:21:55.182 exec error: src/mongo/shell/utils.js:1595 don't know how to show [startupWarnings]
      throw "don't know how to show [" + what + "]";
                                              ^
       
      > 

      Show
      Start a mongod with auth. ./mongod --auth Start a shell, connected to that mongod. ./mongo Expected behavior, unspecified. Actual behavior: $ ./mongo MongoDB shell version: 2.3.2-pre- connecting to: test Wed Jan 2 13:21:55.182 exec error: src/mongo/shell/utils.js:1595 don't know how to show [startupWarnings] throw "don't know how to show [" + what + "]"; ^   >

    Description

      When you connect a shell to a mongod with access control (--auth) enabled, you get an ugly error message because the shell is not yet authorized to fetch the startup warning messages from the server.

      The shell should probably print nothing at all if it isn't authorized.

      Attachments

        Activity

          People

            spencer@mongodb.com Spencer Brody (Inactive)
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: