質問

Steps:

connect to mongo shell via localhost,

use admin switched to db admin db.shutdownServer() assert failed : unexpected error: "shutdownServer failed: unauthorized" Error: Printing Stack Trace at printStackTrace (src/mongo/shell/utils.js:37:15) at doassert (src/mongo/shell/assert.js:6:5) at assert (src/mongo/shell/assert.js:14:5) at DB.shutdownServer (src/mongo/shell/db.js:346:9) at (shell):1:4 Tue Nov 12 23:05:45.236 assert failed : unexpected error: "shutdownServer failed: unauthorized" at src/mongo/shell/assert.js:7

Any suggestion would be great. This started happening after we turned on authentication. Thanks in advance!

役に立ちましたか?

解決

Well, you did not authenticate

instead of

mongo

use admin

try this :

mongo admin -u username -p password

and be sure there is a user on db.admin

http://docs.mongodb.org/manual/reference/method/db.addUser/

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top