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

Shell exception when printing startup warnings with auth enabled.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.0-rc0
    • Affects Version/s: 2.3.2
    • Component/s: Shell
    • Labels:
    • 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 + "]"; ^ >

      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.

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

              Created:
              Updated:
              Resolved: