0

I am using EBS volume on my EC2 instance for storing data. And I installed and run mongodb successfully the only problem is that when I try to connect to mongo shell using sudo mongo admin --username root --password MY_ec2LOG_PASSWORD it give authentication error

root@ip-172-**-**-***:/home/bitnami# sudo mongo admin --username root --password MY_ec2LOG_PASSWORD
MongoDB shell version: 3.2.9
connecting to: /opt/bitnami/mongodb/tmp/mongodb-27017.sock:27017/admin
2016-10-05T09:19:34.710+0000 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
root@ip-172-**-**-***:/home/bitnami#

but when I change the dbpath to EC2instance storage like normal folder and restart the mongodb and then run the same command it runs successfully.

I had already set the owner for the mount directory to the permission same as the other directory on which mongodb is working properly.

May I know why I cannot connect to mongo shell when using EBS as storage.

I am using Bitnami Mean AMI.

naveen
  • 1
  • 2
  • http://stackoverflow.com/questions/37372684/mongodb-3-2-authentication-failed – Mahdi Oct 05 '16 at 10:20
  • how can I create a user if I am not able to enter the shell. and if I enter mongo shell without parameters and then when I try to run db.createUser() it again give me the authentication error. – naveen Oct 05 '16 at 12:00
  • Have you upgraded your mongo? – Mahdi Oct 05 '16 at 12:01

0 Answers0