문제

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