I work on a project deployed on Heroku, with production and staging version. When I want to access to the mongo shell on staging writing this line : mongo <host/app> -u <username> -p <password>
(with <> remplaced with my informations) I have this error :
2016-12-21T11:34:43.861+0100 E QUERY [thread1] Error: Authentication failed. :
DB.prototype._authOrThrow@src/mongo/shell/db.js:1441:20
@(auth):6:1
@(auth):1:2
exception: login failed
It work for production but not for staging. And when I want to do a mongorestore with all informations I have this error :
Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed
Does someone could help me ?
Are the MongoDB server versions for production and staging different? If so, you'll probably need a different version of the client tools. Best to match major versions to avoid issues. Eg 3.0.x server requires at least 3.0.x client tools, 3.2.x server requires at least 3.2.x client tools, etc.