1 year ago

#75067

test-img

Kalyani Pullela

Unable to connect to mongoshell when added TLS/SSL certificates in EC2 instance

I've configured the mongodb using TLS/SSL certificates in the EC2 instance The configuration looks as follows:

#ssl certificates
net:
   tls:
      mode: requireTLS
      certificateKeyFile: /var/lib/mongo/cert/PEG.pem
      CAFile: /var/lib/mongo/cert/peg.ca-bundle

security:
  authorization: enabled

After configuring I'm trying to connect to mongo shell using the following command:

mongo domain.com --tls --tlsCertificateKeyFile /var/lib/mongo/cert/PEG.pem --tlsCAFile /var/lib/mongo/cert/peg.ca-bundle

But unable to enter into the shell and got the following error:

"error":"SSL peer certificate validation failed: unable to verify the first certificate"}}

Could anyone help how to approach this error

Thanks in Advance

mongodb

ssl-certificate

0 Answers

Your Answer

Accepted video resources