[SERVER-8056] Shell exception when printing startup warnings with auth enabled. Created: 02/Jan/13  Updated: 11/Jul/16  Resolved: 17/Jan/13

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.3.2
Fix Version/s: 2.4.0-rc0

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-8098 Mongo shell throws exception when con... Closed
Operating System: ALL
Steps To Reproduce:

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 + "]";
                                        ^
 
> 

Participants:

 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.



 Comments   
Comment by auto [ 17/Jan/13 ]

Author:

{u'date': u'2013-01-16T20:12:47Z', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: SERVER-8056 Better message to user when showing startup warnings in the shell fails
Branch: master
https://github.com/mongodb/mongo/commit/9c49afe9eb138ac806a30cd211095fc52a993fa5

Generated at Thu Feb 08 03:16:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.