Unable to connect to MongoDB with TLS

Description:

I have a mongoDB which I want to monitor. The server is configured with requireTLS and allowConnectionsWithoutCertificates.

I am unable to connect using interface; using tls option in percona requires you to set a certificate but I don’t have any.

Steps to Reproduce:

Here is a simple mongodb file to reproduce (you need a valid certificate /mnt/data/mongodb.pem for your hostname).

net:
  bindIpAll: true
  tls:
    mode: requireTLS
    certificateKeyFile: /mnt/data/mongodb.pem
    disabledProtocols: TLS1_0,TLS1_1
    allowConnectionsWithoutCertificates: true

setParameter:
  tlsUseSystemCA: true

Version:

I’m using version 2.41.2 in docker

Expected Result:

Being able to add the MongoDB serveur.

Actual Result:

Connection check failed: error validating uri: password cannot be specified for MONGO-X509.

Hi @Moroine_Bentefrit, In steps to reproduce I don’t see what command was used to add Mongo. Without full steps to reproduce it’s hard to figure out what’s the problem

Hi, sorry after retrying today it’s working. I had a typo in my domain name, looks like I spent too much time on setup and I wasn’t focused anymore

1 Like