0

I am using MongoDB 4.0.6 with 3 node replica set. I am upgrading my cluster to use SSL, below are steps which i am following :

1) generated CA.pem, server.pem and client.pem file and updated in my mongo config,

  dbPath: /xvdf/data/lib/mongodb
  journal:
    enabled: true
  engine: wiredTiger

systemLog:
  destination: file
  logAppend: true
  logRotate: reopen
  path: /var/log/mongodb/mongod.log

net:
  port: 27017
  bindIp: (IP address)
  ssl:
    mode: allowSSL
    PEMKeyFile: /etc/server.pem
    CAFile: /etc/ssl/ca.pem


processManagement:
  pidFilePath: /var/run/mongodb/mongod.pid

replication:
  replSetName: test

security:
  keyFile: /etc/mongodb-test-keyfile 

2) After updating my config i restarted mongo, It is successfully started with SSL option.

3) Next i ran command db.adminCommand( { setParameter: 1, sslMode: "preferSSL" } ) so it will allow both SSL and nonSSL connection from client.

4) After that when i enabled SSL from client side, I updated my API config with "SSL : true" and with certificates, I am getting bellow error on mongo log file :

"Error receiving request from client: SSLHandshakeFailed: SSL peer certificate validation failed: certificate signature failure"

Please help me on this ASAP.

Thanks.. :)

  • Are you using Enterprise version of Mongodb. – Yogesh J Jan 27 at 14:42
  • No. I am using community version. – sanjay bhanushali Jan 28 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.