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

Shell exception when printing startup warnings with auth enabled.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.4.0-rc0
    • Component/s: Shell
    • Labels:
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: