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.