0

I am new to MongoDB as well in AWS. I am trying to create a node for out an existing mongodb cluster on AWS. After the AWS node is started i was trying to add it into the cluster but is getting 'response status: AuthenticationFailed: Authentication failed.'

  1. So I disabled the auth configuration in mongod.conf which now looks like :

    security:
    #clusterAuthMode: keyFile
    #keyFile: /data/db/mongodb/dory.keyfile
    authorization: disabled

  2. We are using SSL(which doesn't seems to be an issue as we have configuration for that in mongod.conf and has been taken care off) and our exiting mongodb instance is hosted on unix

My question : What am i missing here?All mongoDB support docs mentioned creation of a admin/super user on first use ...i tried that but got same error. Is there a default user (master user and password) created by AWS for initial connection?

2
  • could be security group issue? can your node ping the existing cluster? Commented Sep 19, 2019 at 15:31
  • No we have checked it already and port and permissions are good. Thanks for the response Commented Sep 19, 2019 at 17:26

1 Answer 1

1

Turns out the issue was partly AWS and more of mongoDB one:

  1. On AWS end every new build was using the same mount from old build as it was marked as persistent ...this allows you to deploy a new build without loosing all the data. Although this is the desired behavior but not until the setup is good. So we destroyed old builds and deployed a new build with auth changes.
  2. We need to enable the auth configuration in mongod.conf and make sure that the keyfile is same across all the deployments/nodes

    security: clusterAuthMode: keyFile
    keyFile: /data/db/mongodb/dory.keyfile
    authorization: enabled

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.